class
Rubellite::Spinel::Future(T)
- Rubellite::Spinel::Future(T)
- Reference
- Object
Overview
Represents a pending or completed asynchronous native computation
Defined in:
rubellite/spinel/async.crConstructors
Instance Method Summary
- #channel : Channel(Tuple(T | Nil, Exception | Nil))
- #complete(val : T) : Nil
- #completed? : Bool
- #exception? : Exception | Nil
- #fail(ex : Exception) : Nil
-
#get(timeout : Time::Span) : T
Awaits computation completion with a timeout guard
-
#get : T
Awaits computation completion, returning the result or raising an exception
- #value? : T | Nil