BoundedSemaphore

A bounded semaphore implementation.

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

Constructors

this
this(EventLoop eventLoop, size_t value)
Undocumented in source.

Members

Functions

release
void release()
Undocumented in source. Be warned that the author may not have intended to support it.

Inherited Members

From Semaphore

toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.
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