abstract class Promise
Direct Known Subclasses
Defined in:
promise.crClass Method Summary
-
.all(promises)
Returns the result of all the promises or the first failure
-
.all(*promises)
Returns the result of all the promises or the first failure
-
.all_common(promises)
Returns the result of all the promises or the first failure
-
.race(promises)
returns the first promise to either reject or complete
-
.race(*promises)
returns the first promise to either reject or complete
-
.race_common(promises)
returns the first promise to either reject or complete
-
.resolve(value)
Returns a resolved promise of the type passed
Instance Method Summary
- #catch(&errback : Exception -> _)
- #finally(&callback : Exception | Nil -> _)
- #then : DeferredPromise(Nil)
-
#type : Class
Interfaces available to generic types
Macro Summary
-
collective_action(name, &block)
this drys up the code dealing with splats and enumerables
-
defer(same_thread = false, timeout = nil, &block)
Execute code in the next tick of the event loop and return a promise for obtaining the value
- map(collection, same_thread = false, &block)
- new(type, timeout = nil)
- reject(type, reason)
Instance methods inherited from class Object
__check_for_promise__
__check_for_promise__
Class Method Detail
Instance Method Detail
Macro Detail
Execute code in the next tick of the event loop and return a promise for obtaining the value