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...).

*log-raise-exception*

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

WARNING: If this function throws too the exception will be silently swallowed.

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

WARNING: If this function throws too the exception will be silently swallowed.
sourceraw docstring

asyncmacro

(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

await

(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-exception

(default-log-raise-exception t)
source

defn-asyncmacro

(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-asyncmacro

(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

run-once

(run-once resolve raise)

Wraps the functions provided so that only one will ever be invoked and at most once. Guarantees the release of closed-over references after the first call of either.

Wraps the functions provided so that only one will ever be invoked and
at most once. Guarantees the release of closed-over references after
the first call of either.
sourceraw docstring

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

× close