#include <TCMTSemaphore.h>
Public Member Functions | |
virtual bool | Wait ()=0 |
if semaphore value is > 0 then decrement it and carry on. | |
virtual bool | TryWait ()=0 |
if semaphore value is > 0 then decrement it and return 1 (true). | |
virtual bool | TryWait (uint32 millisecs)=0 |
if semaphore value is > 0 then decrement it and return 1 (true). | |
virtual bool | Post ()=0 |
if any threads are blocked in wait(), wake one of them up. | |
virtual | ~Semaphore () |
Definition at line 60 of file TCMTSemaphore.h.
virtual TC::MT::Semaphore::~Semaphore | ( | ) | [inline, virtual] |
Definition at line 87 of file TCMTSemaphore.h.
virtual bool TC::MT::Semaphore::Wait | ( | ) | [pure virtual] |
if semaphore value is > 0 then decrement it and carry on.
If it's already 0 then block until > 0.
virtual bool TC::MT::Semaphore::TryWait | ( | ) | [pure virtual] |
if semaphore value is > 0 then decrement it and return 1 (true).
If it's already 0 then return 0 (false).
virtual bool TC::MT::Semaphore::TryWait | ( | uint32 | millisecs | ) | [pure virtual] |
if semaphore value is > 0 then decrement it and return 1 (true).
If it's already 0 then block for maximum specified time until > 0
virtual bool TC::MT::Semaphore::Post | ( | ) | [pure virtual] |
if any threads are blocked in wait(), wake one of them up.
Otherwise increment the value of the semaphore.