Dv::Thread Namespace Reference

Classes

class  Actor
 An actor is simply a thread with a mailbox. More...
class  ActorPool
 Requirements on HandlerFactory:. More...
class  Barrier
 A simple Barrier class using posix barriers. More...
class  FlexLock
 Convenience class to synchronize access to a Monitor object. More...
class  Lock
 Convenience class to synchronize access to a Monitor object. More...
class  logstream
 A Dv::Thread::logstream is an ostream useful for logging. More...
class  MailBox
 A mailbox that supports thread-safe addition and retrieval of messages. More...
class  Monitor
class  Pool
 A pool of worker threads. More...
class  Factory
class  SystemInfo
 A class to retrieve some system information. More...
class  Thread
 Posix thread class. More...

Functions

int start (Thread &t)
 Start up thread, executing the main function of this Thread object.

Variables

Debug thread_debug
 Global Dv::Util debug object that can be used to generate trace information from within the package.

Function Documentation

int Dv::Thread::start ( Thread &  t  ) 

Start up thread, executing the main function of this Thread object.

Upon return, the new thread has actually already received some CPU time (actually, it may already have finished).

Parameters:
t thread to start up
Returns:
0 iff ok
errno iff pthread_create failed.
Exceptions:
runtime_error if thread is already running.
Warning:
Upon failure, the Thread subject is not deleted, not even if the thread was created with delete_after_main=true,
See also:
Dv::Thread::Thread::running

Variable Documentation

Global Dv::Util debug object that can be used to generate trace information from within the package.

See also:
Dv::Thread::Thread Example usage:
 Dv::Thread::logstream log(std::cerr, "label");
 
 Dv::Thread::thread_debug.set_log(&log);
 // setting debug level of 10 will generate copious output
 Dv::Thread::thread_debug.set_debug(10); 

dvthread-0.13.4 [11 December, 2009]