core.async like facilities for dealing with asynchronous callback hell with promises (experimental).
This is a clojurescript version of the macros.
core.async like facilities for dealing with asynchronous callback hell with promises (experimental). This is a clojurescript version of the macros.
(async & body)
Asynchronously executes the body, returning immediately to the
calling thread. Additionally, any visible calls to await
on
promise operations within the body will block (if necessary) by
'parking' the calling thread rather than tying up an OS thread (or
the only JS thread when in ClojureScript). Upon completion of the
operation, the body will be resumed.
Returns a promise which will be resolved with the result of the body when completed.
Asynchronously executes the body, returning immediately to the calling thread. Additionally, any visible calls to `await` on promise operations within the body will block (if necessary) by 'parking' the calling thread rather than tying up an OS thread (or the only JS thread when in ClojureScript). Upon completion of the operation, the body will be resumed. Returns a promise which will be resolved with the result of the body when completed.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close