Generated on Mon Jul 6 18:09:39 2009 for Gecode by doxygen 1.5.9

Gecode::Support::Thread Class Reference
[Simple thread and synchronization support]

Simple threads. More...

#include <thread.hh>

List of all members.

Public Member Functions

 Thread (Runnable *r)
 Construct a new thread and run r.
 ~Thread (void)
 Destroy thread handle (does not terminate thread).

Static Public Member Functions

static void sleep (unsigned int ms)
 Put current thread to sleep for ms milliseconds.
static unsigned int npu (void)
 Return number of processing units (1 if information not available).


Detailed Description

Simple threads.

Threads are assumed to properly terminate, the destructor will only release the handle to a thread but will not terminate it. The thread ceases when the call to run terminates, then the runnable object passed will also be deleted.

Requires

Definition at line 99 of file thread.hh.


Constructor & Destructor Documentation

Gecode::Support::Thread::Thread ( Runnable r  ) 

Construct a new thread and run r.

After r terminates, r is deleted. After that, the thread terminates.

Definition at line 53 of file pthreads.cpp.

Gecode::Support::Thread::~Thread ( void   )  [inline]

Destroy thread handle (does not terminate thread).

Definition at line 69 of file pthreads.hpp.


Member Function Documentation

void Gecode::Support::Thread::sleep ( unsigned int  ms  )  [inline, static]

Put current thread to sleep for ms milliseconds.

Definition at line 48 of file pthreads.hpp.

unsigned int Gecode::Support::Thread::npu ( void   )  [inline, static]

Return number of processing units (1 if information not available).

Definition at line 60 of file pthreads.hpp.


The documentation for this class was generated from the following files: