Liking cljdoc? Tell your friends :D

await-cps

async/await for continuation-passing style (CPS) functions.

This library delivers async/await expressions for use with asynchronous functions that take resolve and raise callbacks as the last parameters (e.g. ring, clj-http...).

async/await for continuation-passing style (CPS) functions.

This library delivers async/await expressions for use with asynchronous
functions that take resolve and raise callbacks as the last parameters
(e.g. ring, clj-http...).
raw docstring

*log-raise-exception*clj

If the raise callback in an async block throws, the exception will be logged with this function.

If the raise callback in an async block throws, the exception will be logged
with this function.
sourceraw docstring

afncljmacro

(afn name? [params*] body)

Defines an asynchronous function. Declared parameters are extended with two continuation arguments of &resolve and &raise and these continuations will be called with the function result or any exception thrown respectively.

Executes in the calling thread up until the first await clause. Execution is then resumed in the thread awaited function invokes its continuation in. This may still be the calling thread.

Only one arity is allowed.

Defines an asynchronous function. Declared parameters are extended with two
continuation arguments of &resolve and &raise and these continuations will
be called with the function result or any exception thrown respectively.

Executes in the calling thread up until the first await clause. Execution is
then resumed in the thread awaited function invokes its continuation in.
This may still be the calling thread.

Only one arity is allowed.
sourceraw docstring

asynccljmacro

(async resolve raise & body)

Like ((fn-async [] body*) resolve raise).

Like ((fn-async [] body*) resolve raise).
sourceraw docstring

awaitclj

(await cps-fn & args)

Awaits asynchronous execution of continuation-passing style function cps-fn, applying it to args plus two extra callback functions: resolve and raise. Effectively returns the value passed to resolve or throws the exception passed to raise. Must be called in an asynchronous function.

Awaits asynchronous execution of continuation-passing style function cps-fn,
applying it to args plus two extra callback functions: resolve and raise.
Effectively returns the value passed to resolve or throws the exception
passed to raise. Must be called in an asynchronous function.
sourceraw docstring

await!clj

(await! f & args)

Like await but blocks the calling thread. Do not use inside an asynchronous function.

Like await but blocks the calling thread. Do not use inside an asynchronous
function.
sourceraw docstring

default-log-raise-exceptionclj

(default-log-raise-exception t)

Default logger for exceptions in raise callbacks prints the message to stdio.

Default logger for exceptions in raise callbacks prints the message to stdio.
sourceraw docstring

defn-asynccljmacro

(defn-async name doc-string? attr-map? [params*] body)

Same as defn but defines an asynchronous function with extra &resolve and &raise continuation params. Only one arity is allowed.

Same as defn but defines an asynchronous function with extra &resolve and
&raise continuation params. Only one arity is allowed.
sourceraw docstring

fn-asynccljmacrodeprecated

Deprecated - renamed to afn.

Deprecated - renamed to afn.
sourceraw docstring

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

× close