Future

Defines a future

final
class Future {}

Constructors

this
this()

Constructs a new Future

Members

Functions

await
Result await()

Awaits this future either returning the result from its computation throwing the exception which occurred during it.

complete
void complete(Result result)

Sets this Future as completed by storing the provided result into it and waking up anybody who was awaiting it

error
void error(Exception errResult)

Sets this Future into the error state and wakes up anybody who was awaiting it

Variables

state
State state;

State of the future

Meta