Semaphore
Engine/source/platform/threads/semaphore.h
Protected Attributes
Public Functions
Detailed Description
Protected Attributes
PlatformSemaphore * mData
Public Functions
Semaphore(S32 initialCount)
Create a semaphore. initialCount defaults to 1.
~Semaphore()
Delete a semaphore, ignoring it's count.
acquire(bool block, S32 timeoutMS)
Acquire 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()
Release the semaphore, incrementing its count.
Never blocks.