Liking cljdoc? Tell your friends :D

jtk-dvlp.async.interop.promise


->promise-chanclj/s

(->promise-chan c)

Ensure given channel c to be a promise-chan. See core.async/promise-chan for more infos. Auto closes channel c.

Ensure given channel `c` to be a `promise-chan`.
See `core.async/promise-chan` for more infos.
Auto closes channel `c`.
sourceraw docstring

<p!clj/smacro

(<p! ?exp)

Like <! for promise via p->c convertion.

Like `<!` for promise via `p->c` convertion.
sourceraw docstring

c->pclj/s

(c->p c)

Creates a promise and resolves it with the val of channel c taken by <! or rejects it on exception (ExceptionInfo). Closes the channel after took val.

Creates a promise and resolves it with the val of channel `c`
taken by `<!` or rejects it on exception (`ExceptionInfo`). Closes the channel after took val.
sourceraw docstring

p->cclj/s

(p->c p)

Creates a promise-chan and put the val of resolved promise p or put an instance of ExceptionInfo if promise is rejected. Closes the channel after took val.

Creates a `promise-chan` and put the val of resolved promise `p`
or put an instance of `ExceptionInfo` if promise is rejected.
Closes the channel after took val.
sourceraw docstring

promise-chanclj/s

(promise-chan)
(promise-chan f)

Creates an promise like channel, see core.async/promise-chan.

Given function f can be used to fill the promise. f will be called with one arg functions resolve and reject to resolve or reject the created promise. Rejection value will be wrapped in ExceptionInfo as cause.

Creates an promise like channel, see `core.async/promise-chan`.

Given function `f` can be used to fill the promise.
`f` will be called with one arg functions `resolve` and `reject`
to resolve or reject the created promise. Rejection value will
be wrapped in `ExceptionInfo` as `cause`.
sourceraw docstring

promise-goclj/smacro

(promise-go & body)

Like go but returns a promise-chan.

Like `go` but returns a `promise-chan`.
sourceraw docstring

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

× close