Gecode::Support::Mutex Class Reference
[Simple thread and synchronization support]
A mutex for mutual exclausion among several threads.
More...
#include <thread.hh>
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
#include <gecode/support/thread.hh>
Definition at line 142 of file thread.hh.
Constructor & Destructor Documentation
| Gecode::Support::Mutex::Mutex | ( | void | ) | [inline] |
| Gecode::Support::Mutex::~Mutex | ( | void | ) | [inline] |
Member Function Documentation
| void Gecode::Support::Mutex::acquire | ( | void | ) | [inline] |
| bool Gecode::Support::Mutex::tryacquire | ( | void | ) | [inline] |
| void Gecode::Support::Mutex::release | ( | void | ) | [inline] |
The documentation for this class was generated from the following files:
- gecode/support/thread.hh (Revision: 9138)
- gecode/support/thread/pthreads.hpp (Revision: 9163)
