Future

Undocumented in source.

Members

Functions

error
void error(Throwable t)
Undocumented in source. Be warned that the author may not have intended to support it.
finish
void finish()
Undocumented in source. Be warned that the author may not have intended to support it.
finish
void finish(T value)
Undocumented in source. Be warned that the author may not have intended to support it.
getBlocking
T getBlocking()

Waits for the result of this future using Thread.sleep

getYield
T getYield()

Waits for the result of this future using Fiber.yield

onDone
void onDone(void delegate() callback)

Sets the onDone callback if no value has been set yet or calls immediately if the value has already been set or was set during setting the callback. Crashes with an assert error if attempting to override an existing callback (i.e. calling this function on the same object twice).

Static functions

async
Future!T async(T delegate() cb)
Undocumented in source. Be warned that the author may not have intended to support it.
finished
Future!void finished()
Undocumented in source. Be warned that the author may not have intended to support it.
fromError
Future!T fromError(Throwable error)
Undocumented in source. Be warned that the author may not have intended to support it.
fromResult
Future!T fromResult(T value)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_onDone
void delegate() _onDone;
Undocumented in source.
exception
Throwable exception;
Undocumented in source.
has
bool has;
Undocumented in source.
value
T value;
Undocumented in source.

Meta