class

Promise(Input)

Inherits Reference / Object

Class methods

all(promises)
Source
all(*promises)
Source
defer(timeout = nil, &block : -> _)

Execute code in the next tick of the event loop and return a promise for obtaining the value

Source
map(collection : Enumerable(T), &block : T -> V) forall T, V

Asynchronously map an Enumerable

Source
race(promises)

returns the first promise to either reject or complete

Source
race(*promises)

returns the first promise to either reject or complete

Source
resolve(value)

Returns a resolved promise of the type passed

Source
timeout(promise : Promise, time : Time::Span)
Source

Instance methods

catch
Source
finally
Source
then
Source
type

Interfaces available to generic types

Source

Macros

collective_action(name, &block)

this drys up the code dealing with splats and enumerables

Source
new(type, timeout = nil)
Source
reject(type, reason)
Source

Nested types