Semaphore Class Reference#include <semaphore.h>
Constructor & Destructor Documentation
Create a semaphore. initialCount defaults to 1.
Delete a semaphore, ignoring it's count.
Member Function DocumentationAcquire the semaphore, decrementing its count. if the initial count is less than 1, block until it goes above 1, then acquire. Returns true if the semaphore was acquired, false if the semaphore could not be acquired and block was false.
Release the semaphore, incrementing its count. Never blocks.
Member Data Documentation
|