Virtual thread future - like clojure.core/future but always uses virtual threads.
Usage: (let [f (vfuture (expensive-computation))] ;; do other work @f) ; blocks until computation completes
Exceptions thrown in the body are re-thrown when dereferencing. Dynamic bindings from the calling thread are preserved.
Virtual thread future - like clojure.core/future but always uses virtual threads. Usage: (let [f (vfuture (expensive-computation))] ;; do other work @f) ; blocks until computation completes Exceptions thrown in the body are re-thrown when dereferencing. Dynamic bindings from the calling thread are preserved.
(vfuture & body)Execute body on a virtual thread. Returns a derefable future.
Dereferencing blocks until the computation completes and returns the result. If the body throws an exception, it is re-thrown when dereferencing.
Dynamic bindings from the calling thread are preserved. Supports timeout via (deref f timeout-ms timeout-val).
Execute body on a virtual thread. Returns a derefable future. Dereferencing blocks until the computation completes and returns the result. If the body throws an exception, it is re-thrown when dereferencing. Dynamic bindings from the calling thread are preserved. Supports timeout via (deref f timeout-ms timeout-val).
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 |