#include <fbxsync.h>
Mutually excluding thread waiting mechanism with a counter.
Semaphore are generally used in situations when the current thread needs to wait for other threads before proceeding to the next step. In other words, that thread waits a number of signals from other threads. This is the best mechanism to use to synchronize threads since it doesn't require an heavy critical section.
Public Member Functions |
|
| FbxSemaphore () | |
| Constructor. |
|
| virtual | ~FbxSemaphore () |
| Destructor. |
|
| bool | Wait (unsigned int pCount=1) |
| Wait indefinitely until the semaphore as
been signaled as many times as specified. |
|
| bool | Signal (unsigned int pCount=1) |
| Signal the semaphore as many times as
specified. |
|
| FbxSemaphore | ( | ) |
Constructor.
| virtual ~FbxSemaphore | ( | ) | [virtual] |
Destructor.
| bool Wait | ( | unsigned int | pCount = 1 |
) |
Wait indefinitely until the semaphore as been signaled as many times as specified.
| pCount | Number of signal to wait before this function returns. |
| bool Signal | ( | unsigned int | pCount = 1 |
) |
Signal the semaphore as many times as specified.
| pCount | The number of signal to send to the semaphore. |