BoundedSemaphore

A bounded semaphore implementation.

This throws an Exception in $(D_PSYMBOL release()) if it would increase the value above the initial value.

class BoundedSemaphore : Semaphore {}

Inherited Members

From Semaphore

acquire
bool acquire()

Acquire a semaphore.

locked
bool locked [@property getter]

Returns $(D_KEYWORD true) if semaphore can not be acquired immediately.

release
void release()

Release a semaphore, incrementing the internal counter by one. When it was zero on entry and another coroutine is waiting for it to become larger than zero again, wake up that coroutine.

Meta