Semaphore.tryWait

If the current count is equal to zero, return. Otherwise, atomically decrement the count by one and return true.

class Semaphore
bool
tryWait
()

Return Value

Type: bool

true if the count was above zero and false if not.

Throws

SyncException on error.

Meta