Liking cljdoc? Tell your friends :D
Clojure only.

dar.async.promise


IPromisecljprotocol

abort!clj

(abort! this)

Notifies the underlying async computation that the result is no longer needed. Generally it should release all resources and yield an exception as a promised value. However, this method is advisory. Computation might still complete successfully after abort. This method might be called several times.

Notifies the underlying async computation that the
result is no longer needed. Generally it should
release all resources and yield an exception as a promised value.
However, this method is advisory. Computation might still
complete successfully after abort. This method might be called
several times.

deliver!clj

(deliver! this val)

Delivers the supplied value to promise and notifies all registered then callbacks. Subequent calls will be ignored.

Delivers the supplied value to promise and notifies
all registered `then` callbacks. Subequent calls
will be ignored.

delivered?clj

(delivered? this)

Returns true if the result was already delivered.

Returns true if the result was already delivered.

thenclj

(then this cb)

Registers a result handler function. It might be called immedeately.

Registers a result handler function. It might be called
immedeately.

valueclj

(value this)

Returns the delivered value or nil

Returns the delivered value or nil
source

new-promiseclj

(new-promise)
(new-promise abort-cb)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close