Syncrhonously blocks until the value is ready, then returns it.
Syncrhonously blocks until the value is ready, then returns it. WARNING: May block indefinitely. A kitten dies every time you call this method.
Breaks the promise.
Breaks the promise. After this method finishes, any registered continuation will not receive the value. If evaluation has not yet started, it will never start.
Indicates whether the promise has been broken.
Indicates whether the promise has been broken. A broken promise is never fulfilled.
Registers the given error handler as a continuation receiving errors thrown by the evaluation.
Returns a promise that is only ever fulfilled if the value of this promise matches the given predicate.
Registers the given function as a continuation, returning the result of that function.
Sets the value of this promise, out of band.
Sets the value of this promise, out of band. WARNING: Once the value of a promise is set, it is forever immutable.
Indicates whether the evaluation of this promise has finished.
Syncrhonously blocks until the value is ready, then returns it.
Syncrhonously blocks until the value is ready, then returns it. WARNING: May block indefinitely. A kitten dies every time you call this method.
Registers the given function as a continuation, returning a promise of the result.
Speculative concurrency.
Speculative concurrency. In the expression guess.spec(f, actual)
the value of
guess
is an inexpensive guess at the value and actual
is the actual value,
usually a more expensive computation. The function f
is speculatively applied
to the guess
. Once the actual
value is available, it's compared with the guess
.
If the guess
was correct, we will have already applied f
to the correct value,
saving time. If the guess was incorrect, then f
is applied to the value of actual
.
Indicates whether the evaluation of this promise threw an error.
Registers the given actor or effect as a continuation receiving the promised value.
Represents an expression that is evaluated asynchronously, according to some evaluation strategy.