#include <tnlThread.h>
Public Methods | |
| Semaphore (U32 initialCount=0, U32 maximumCount=1024) | |
| Semaphore constructor - initialCount specifies how many wait calls will be let through before an increment is required. | |
| void | wait () |
| Thread calling wait will block as long as the semaphore's count is zero. | |
| void | increment (U32 count=1) |
| Increments the semaphore's internal count. | |
The semaphore class wraps OS specific semaphore functionality for thread synchronization.
Definition at line 47 of file tnlThread.h.
|
|
Increments the semaphore's internal count. This will wake count threads that are waiting on this semaphore. Definition at line 141 of file thread.cpp. References TNL::U32. Referenced by TNL::ThreadQueue::postCall(). |
|
|
Thread calling wait will block as long as the semaphore's count is zero. If the semaphore is incremented, one of the waiting threads will be awakened and the semaphore will decrement. Definition at line 136 of file thread.cpp. Referenced by TNL::ThreadQueue::dispatchNextCall(). |
1.2.18