Generated on Fri Aug 24 2012 04:52:33 for Gecode by doxygen 1.8.1.1
Gecode::Support::Thread Class Reference

Simple threads. More...

#include <thread.hpp>

List of all members.

Classes

class  Run
 A real thread. More...

Static Public Member Functions

static void run (Runnable *r)
 Construct a new thread and run r.
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)

Static Public Attributes

static Mutex m
 Mutex for synchronization.
static Runidle = NULL
 Idle runners.

Detailed Description

Simple threads.

Threads cannot be created, only runnable objects can be submitted for execution by a thread. Threads are pooled to avoid creation/destruction of threads as much as possible.

Definition at line 208 of file thread.hpp.


Member Function Documentation

void Gecode::Support::Thread::run ( Runnable r)
inlinestatic

Construct a new thread and run r.

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

If the operatins system does not support any threads, throws an exception of type Support::OperatingSystemError.

Definition at line 92 of file thread.hpp.

void Gecode::Support::Thread::sleep ( unsigned int  ms)
inlinestatic

Put current thread to sleep for ms milliseconds.

Definition at line 78 of file none.hpp.

unsigned int Gecode::Support::Thread::npu ( void  )
inlinestatic

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

Definition at line 80 of file none.hpp.


Member Data Documentation

Mutex Gecode::Support::Thread::m
static

Mutex for synchronization.

Definition at line 233 of file thread.hpp.

Thread::Run * Gecode::Support::Thread::idle = NULL
static

Idle runners.

Definition at line 235 of file thread.hpp.


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