Liking cljdoc? Tell your friends :D

fractal-engine.concurrent

Bounded parallel fanout and small concurrency governors, independent of what is being fanned out. The engine semantics live elsewhere. Threads are daemons so a stuck provider call never pins JVM shutdown, and bindings propagate via bound-fn so dynamic vars (current turn/eval ids) survive the thread hop.

Bounded parallel fanout and small concurrency governors, independent of what
is being fanned out. The engine semantics live elsewhere. Threads are daemons
so a stuck provider call never pins JVM shutdown, and bindings propagate via
bound-fn so dynamic vars (current turn/eval ids) survive the thread hop.
raw docstring

daemon-executorclj

(daemon-executor prefix)
source

parallel-map-indexedclj

(parallel-map-indexed prefix f xs)

Run (f idx x) over xs in parallel, preserving input order in the result. Caller-side exceptions surface from the returned futures; ordering is by index, not completion.

Run (f idx x) over xs in parallel, preserving input order in the result.
Caller-side exceptions surface from the returned futures; ordering is by index,
not completion.
sourceraw docstring

semaphoreclj

(semaphore n)
source

with-deadlineclj

(with-deadline timeout-ms thunk)

Run thunk under a wall-clock bound. If it doesn't finish within timeout-ms, throw ex-info :provider/timeout and abandon the orphaned work (daemon thread, so it never blocks JVM exit — though an orphaned provider call may still incur cost). A nil/zero timeout means no bound. Exceptions from the thunk propagate unwrapped.

Run `thunk` under a wall-clock bound. If it doesn't finish within `timeout-ms`,
throw ex-info :provider/timeout and abandon the orphaned work (daemon thread, so
it never blocks JVM exit — though an orphaned provider call may still incur cost).
A nil/zero timeout means no bound. Exceptions from the thunk propagate unwrapped.
sourceraw docstring

with-permitclj

(with-permit sem thunk)

Run thunk while holding one permit from sem. A nil semaphore means unlimited. The permit bounds the work inside the thunk; callers decide whether queue wait belongs inside any deadline.

Run `thunk` while holding one permit from `sem`. A nil semaphore means
unlimited. The permit bounds the work inside the thunk; callers decide whether
queue wait belongs inside any deadline.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close