Promises and futures largely compatible with the clojure.core api.
The main difference is, that [[cljs.core/deref]]/@ cannot be used
on promises and futures. Instead async-deref can be used to work
with the respective results asynchronously. Also, futures may do
asynchronous operations, by returning a core/promise.
Note that [[cljs.core/realized?]] works on both promises and futures.
Promises and futures largely compatible with the clojure.core api. The main difference is, that [[cljs.core/deref]]/`@` cannot be used on promises and futures. Instead [[async-deref]] can be used to work with the respective results asynchronously. Also, futures may do asynchronous operations, by returning a [[core/promise]]. Note that [[cljs.core/realized?]] works on both promises and futures.
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 |