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.
(do-return state value)
(do-take state blk p)
(run-state-machine-wrapped state)
cljdoc builds & hosts documentation for Clojure/Script libraries
Ctrl+k | Jump to recent docs |
← | Move to previous article |
→ | Move to next article |
Ctrl+/ | Jump to the search field |