cpp-pthread  (v1.7.3)
Simple C++ wrapper to pthread functions.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Namespaces | Classes | Enumerations | Functions
Threads

Namespaces

 pthread::this_thread
 

Classes

class  pthread::runnable
 
class  pthread::thread
 
class  pthread::abstract_thread
 
class  pthread::thread_group
 

Enumerations

enum  pthread::thread_status { pthread::thread_status::not_a_thread, pthread::thread_status::a_thread }
 

Functions

void * pthread::thread_startup_runnable (void *)
 
void pthread::this_thread::sleep_for (const int millis)
 
pthread_t pthread::this_thread::get_id ()
 

Detailed Description

Set of classes that handle threads

Author
herbert koelman (herbe.nosp@m.rt.k.nosp@m.oelma.nosp@m.n@me.nosp@m..com)

Enumeration Type Documentation

current status of a thread instance

Enumerator
not_a_thread 

this not a thread (i.e. after a move operation)

a_thread 

a valid thread

Definition at line 47 of file thread.hpp.

Function Documentation

pthread_t pthread::this_thread::get_id ( )
Returns
current thread id/reference
Examples:
synchronized_queue_tests.cpp.

Definition at line 21 of file thread.cpp.

void pthread::this_thread::sleep_for ( const int  millis)

let the current thread sleep for the given milliseconds.

Parameters
millistime to wait.
Examples:
synchronized_queue_tests.cpp.

Definition at line 17 of file thread.cpp.

void * pthread::thread_startup_runnable ( void *  runner)

Function used to startup a thread.

it expects a reference to a runnable instance

This function is a helper function. It has normal C linkage, and is the base for newly created Thread objects. It runs the run method on the thread object passed to it (as a void *).

Definition at line 215 of file thread.cpp.