A synchronization primitive for multithreaded applications. Multiple Get() method calls from one process will deadlock the calling process, this is the main difference from Mutex. More...
#include <Semaphore.h>
Classes | |
| class | Scoped_Lock |
| Semaphore is acquired on Scoped_Lock construction and released on destruction. More... | |
Public Member Functions | |
| Semaphore () | |
| Constructor, creates unnamed semaphore object. | |
| unsigned int | Get (unsigned int timeout=INFINITE) |
| Gets the semaphore. If it is not free then waits (blocking) for specified timeout and either gets the semaphore or returns an error. If no error was encountered returns 0. | |
| unsigned int | Release () |
| Releases the semaphore allowing other threads to access the mutex-protected resource. | |
A synchronization primitive for multithreaded applications. Multiple Get() method calls from one process will deadlock the calling process, this is the main difference from Mutex.