class

Promise::Deferred(Input)

Inherits Reference / Object

Constructors

new(promise : DeferredPromise(Input) | ResolvedPromise(Input) | RejectedPromise(Input))
Source

Instance methods

inspect(io : IO) : Nil

We need to implement this as @reference could be uninitialized

Source
pending(resolution : Proc(Input, Nil), rejection : Proc(Exception, Exception)) : Nil
Source
ref(value : Input | DeferredPromise(Input) | RejectedPromise(Input) | ResolvedPromise(Input)) : DeferredPromise(Input) | RejectedPromise(Input) | ResolvedPromise(Input)
Source
reject(reason : String | Exception)
Source
resolve(value)
Source
resolved?
Source