You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
844 B
C++
34 lines
844 B
C++
// Copyright (C) 2006 Davis E. King (davis@dlib.net)
|
|
// License: Boost Software License See LICENSE.txt for the full license.
|
|
#undef DLIB_CREATE_NEW_THREAD_EXTENSIOn_ABSTRACT_
|
|
#ifdef DLIB_CREATE_NEW_THREAD_EXTENSIOn_ABSTRACT_
|
|
|
|
#include "threads_kernel_abstract.h"
|
|
|
|
namespace dlib
|
|
{
|
|
|
|
// ----------------------------------------------------------------------------------------
|
|
|
|
template <
|
|
typename T,
|
|
void (T::*funct)()
|
|
>
|
|
bool create_new_thread (
|
|
T& obj
|
|
);
|
|
/*!
|
|
ensures
|
|
- creates a new thread and calls obj.*funct() from it.
|
|
- returns true upon success and false upon failure to create the new thread.
|
|
!*/
|
|
|
|
// ----------------------------------------------------------------------------------------
|
|
|
|
}
|
|
|
|
#endif // DLIB_CREATE_NEW_THREAD_EXTENSIOn_ABSTRACT_
|
|
|
|
|
|
|