TAwaitable

An event that can occur at some point in the future and which can be awaited, either by blocking until it occurs, or by registering a callback delegate.

Members

Functions

addCallback
void addCallback(void delegate() dg)

Registers a callback that is called if the event occurs.

removeCallback
bool removeCallback(void delegate() dg)

Removes a previously added callback.

wait
void wait()

Waits until the event occurs.

wait
bool wait(Duration timeout)

Waits until the event occurs or the specified timeout expires.

Meta