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

asynccljmacro

(async resolve raise & body)

Executes the body calling resolve with the result. Exceptions thrown by either the body or the resolve function will be raised calling raise.

Executes in the calling thread up to the first await clause. Execution is then resumed in the thread awaited function run its resolve callback in. This may be the calling thread.

Executes the body calling resolve with the result. Exceptions thrown by
either the body or the resolve function will be raised calling raise.

Executes in the calling thread up to the first await clause. Execution is
then resumed in the thread awaited function run its resolve callback in.
This may be the calling thread.
sourceraw docstring

awaitclj

(await f & args)

Awaits asynchronous execution of continuation-passing style function f, applying it to args provided plus two extra callback functions: resolve and raise. Returns the value passed to resolve or throws the exception passed to raise. Must execute in an async block.

Awaits asynchronous execution of continuation-passing style function f,
applying it to args provided plus two extra callback functions: resolve and
raise. Returns the value passed to resolve or throws the exception passed
to raise. Must execute in an async block.
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 adds &resolve and &raise params and executes the body in an async block using those as callbacks. Only one arity is allowed.

Same as defn but adds &resolve and &raise params and executes the body
in an async block using those as callbacks. Only one arity is allowed.
sourceraw docstring

fn-asynccljmacro

(fn-async name? [params*] body)

Same as fn but adds &resolve and &raise params and executes the body in an async block using those as callbacks. Only one arity is allowed.

Same as fn but adds &resolve and &raise params and executes the body
in an async block using those as callbacks. Only one arity is allowed.
sourceraw docstring

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

× close