|thread (size_t thread_id=0)|
|void||launch (const boost::function< void(void)> &spawn_routine)|
|void||launch (const boost::function< void(void)> &spawn_routine, size_t cpu_id)|
|bool||active () const|
|Returns true if the thread is still running. |
|Returns the pthread thread id. |
|static tls_data &||get_tls_data ()|
|Static helper routines. |
|static size_t||thread_id ()|
|static void||join (thread &other)|
|static void||thread_destroy_callback ()|
|static void||set_thread_destroy_callback (void(*callback)())|
|static size_t||cpu_count ()|
A collection of routines for creating and managing threads.
The thread object performs limited exception forwarding. exception throws within a thread of type const char* will be caught and forwarded to the join() function. If the call to join() is wrapped by a try-catch block, the exception will be caught safely and thread cleanup will be completed properly.
|graphlab::thread::thread||(||size_t|| thread_id =
|static size_t graphlab::thread::cpu_count||(||)||
Return the number processing units (individual cores) on this system
|static tls_data& graphlab::thread::get_tls_data||(||)||
Static helper routines.
Get the thread specific data associated with this thread
|static void graphlab::thread::join||(||thread &||other||)||
This static method joins the invoking thread with the other thread object. This thread will not return from the join routine until the other thread complets it run.
|void graphlab::thread::launch||(||const boost::function< void(void)> &||spawn_routine,|
Same as launch() except that you can specify a CPU on which to run the thread. This only currently supported in Linux and if invoked on a non Linux based system this will be equivalent to start().
|void graphlab::thread::launch||(||const boost::function< void(void)> &||spawn_routine||)|
execute this function to spawn a new thread running spawn_function routine
|static size_t graphlab::thread::thread_id||(||)||