Struct Future

Representation for future calculation result

struct Future(T) ;

Properties

NameTypeDescription
exception[get] ThrowableReturns the exception stored in the future's result (if any)
ready[get] boolReturns whether the future has a return value

Methods

NameDescription
get Get the result stored in the future
raise Set the future's state to raised exception
runInFiber Launch a new fiber that will run the specified callback, set the future when the callback returns
set Sets the future with no value
wait Wait for the future to be set