Liking cljdoc? Tell your friends :D

promesa.protocols

A generic promise abstraction and related protocols.

A generic promise abstraction and related protocols.
raw docstring

ICancellableclj/s≠protocol

A cancellation abstraction.

A cancellation abstraction.

-cancel!clj/s

(-cancel! _)

-cancelled?clj/s

(-cancelled? _)
sourceraw docstring

ICompletableclj/s≠protocol

-reject!clj/s

(-reject! _ e)

Deliver an error to empty promise.

Deliver an error to empty promise.

-resolve!clj/s

(-resolve! _ v)

Deliver a value to empty promise.

Deliver a value to empty promise.
source

IExecutorclj/s≠protocol

-run!clj/s

(-run! _ task)

Run a task and return a promise.

Run a task and return a promise.

-submit!clj/s

(-submit! _ task)

Submit a task and return a promise.

Submit a task and return a promise.
source

IPromiseclj/s≠protocol

A basic promise abstraction.

A basic promise abstraction.

-bindclj/s

(-bind _ f)
(-bind _ f executor)

Chain a computation to be executed in a microtask.

Chain a computation to be executed in a microtask.

-catchclj/s

(-catch _ f)

Catch a error in a promise.

Catch a error in a promise.

-finallyclj/s

(-finally _ f)
(-finally _ f executor)

Runs side-effectful code after completion or rejection, returns the original promise.

Runs side-effectful code after completion or rejection, returns
the original promise.

-handleclj/s

(-handle _ f)
(-handle _ f executor)

Chain a computation when promise completes either normally or exceptionally.

Chain a computation when promise completes either normally or
exceptionally.

-mapclj/s

(-map _ f)
(-map _ f executor)

Chain a computation to be executed in a microtask.

Chain a computation to be executed in a microtask.
sourceraw docstring

IPromiseFactoryclj/s≠protocol

A promise constructor abstraction.

A promise constructor abstraction.

-promiseclj/s

(-promise _)

Create a promise instance from other types

Create a promise instance from other types
sourceraw docstring

ISchedulerclj/s≠protocol

A generic abstraction for scheduler facilities.

A generic abstraction for scheduler facilities.

-schedule!clj/s

(-schedule! _ ms func)

Schedule a function to be executed in future.

Schedule a function to be executed in future.
sourceraw docstring

IStateclj/s≠protocol

Additional state/introspection abstraction.

Additional state/introspection abstraction.

-extractclj/s

(-extract _)

Extract the current value.

Extract the current value.

-pending?clj/s

(-pending? _)

Retutns true if a promise is pending.

Retutns true if a promise is pending.

-rejected?clj/s

(-rejected? _)

Returns true if a promise is rejected.

Returns true if a promise is rejected.

-resolved?clj/s

(-resolved? _)

Returns true if a promise is resolved.

Returns true if a promise is resolved.
sourceraw docstring

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

× close