Syn::Future(T)
Inherits Reference / Object
An object that will eventually hold a value.
Can be used to ask an Agent to compute a value asynchronously, while the
current fiber continues to do other things, yet be able to retrieve or wait
until the value is available.
TODO: report a failure with an optional exception
Constructors
Instance methods
Report a failure when trying to resolve the future. Wakes up pending fibers.
TODO: raise if the future has already been resolved/failed
Blocks the current fiber until the value is resolved or timeout is
reached, in which case it returns nil.
Blocks the current fiber until the value is resolved. Raises an exception if the future has failed.
Returns the value if it was resolved. Returns nil otherwise without
blocking. Raises an exception if the future has failed.
Sets the value and wakes up pending fibers.
TODO: raise if the future has already been resolved/failed