Future

Encapsulates the asynchronous execution of a callable.

Constructors

this
this(EventLoop eventLoop)
Undocumented in source.

Members

Aliases

ResultType
alias ResultType = T
Undocumented in source.

Functions

result
T result()
setResult
void setResult(T result)

Mark the future done and set its result.

setResultUnlessCancelled
void setResultUnlessCancelled(T result)

Helper setting the result only if the future was not cancelled.

Inherited Members

From BaseFuture

eventLoop
EventLoop eventLoop;
Undocumented in source.
cancel
bool cancel()
Undocumented in source. Be warned that the author may not have intended to support it.
cancelled
bool cancelled()
Undocumented in source. Be warned that the author may not have intended to support it.
done
bool done()
Undocumented in source. Be warned that the author may not have intended to support it.
exception
Throwable exception()
Undocumented in source. Be warned that the author may not have intended to support it.
addDoneCallback
void addDoneCallback(void delegate(FutureHandle) callback)
Undocumented in source. Be warned that the author may not have intended to support it.
removeDoneCallback
size_t removeDoneCallback(void delegate(FutureHandle) callback)
Undocumented in source. Be warned that the author may not have intended to support it.
setException
void setException(Throwable exception)
Undocumented in source. Be warned that the author may not have intended to support it.
toString
string toString()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta