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.

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.
raw 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.
raw 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.
raw docstring

default-log-raise-exceptionclj

(default-log-raise-exception t)

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.
raw 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.
raw docstring

run-onceclj

(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.
raw docstring

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

× close