Semaphore.acquire

Acquire a semaphore.

If the internal counter is larger than zero on entry, decrement it by one and return $(D_KEYWORD true) immediately. If it is zero on entry, block, waiting until some other coroutine has called $(D_PSYMBOL release()) to make it larger than 0, and then return $(D_KEYWORD true).

class Semaphore
bool
acquire
()

Meta