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

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

A mutex for mutual exclausion among several threads. More...

#include <thread.hh>

List of all members.

Public Member Functions

 Mutex (void)
 Initialize mutex.
void acquire (void)
 Acquire the mutex and possibly block.
bool tryacquire (void)
 Try to acquire the mutex, return true if succesful.
void release (void)
 Release the mutex.
 ~Mutex (void)
 Delete mutex.


Detailed Description

A mutex for mutual exclausion among several threads.

It is not specified whether the mutex is recursive or not. Likewise, there is no guarantee of fairness among the blocking threads.

Requires

Definition at line 142 of file thread.hh.


Constructor & Destructor Documentation

Gecode::Support::Mutex::Mutex ( void   )  [inline]

Initialize mutex.

Definition at line 77 of file pthreads.hpp.

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

Delete mutex.

Definition at line 96 of file pthreads.hpp.


Member Function Documentation

void Gecode::Support::Mutex::acquire ( void   )  [inline]

Acquire the mutex and possibly block.

Definition at line 82 of file pthreads.hpp.

bool Gecode::Support::Mutex::tryacquire ( void   )  [inline]

Try to acquire the mutex, return true if succesful.

Definition at line 87 of file pthreads.hpp.

void Gecode::Support::Mutex::release ( void   )  [inline]

Release the mutex.

Definition at line 91 of file pthreads.hpp.


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