Liking cljdoc? Tell your friends :D

co.multiply.quiescent.impl.executor


cpu-executorclj

Work stealing thread pool for CPU-bound tasks. Use for compute-intensive work that should not block. Pool size scales with available CPUs.

Work stealing thread pool for CPU-bound tasks. Use for compute-intensive work
that should not block. Pool size scales with available CPUs.
raw docstring

delegate-cpuclj/s

(delegate-cpu f)

Queue work for execution on the CPU thread pool (CLJ only).

Use for compute-intensive operations that should not block. Throws in ClojureScript - use delegate-virtual instead.

Returns a Future (CLJ) for cancellation.

Queue work for execution on the CPU thread pool (CLJ only).

Use for compute-intensive operations that should not block.
Throws in ClojureScript - use delegate-virtual instead.

Returns a Future (CLJ) for cancellation.
raw docstring

delegate-scheduledclj/s≠

clj
(delegate-scheduled ms-or-duration f)

Schedule work for delayed execution.

Use for sleep, timeout, and other time-based operations.

Args: ms-or-duration - Delay as milliseconds (non-negative Long) or java.time.Duration f - Function to execute after delay

Returns a ScheduledFuture for cancellation.

Schedule work for delayed execution.

Use for sleep, timeout, and other time-based operations.

Args:
  ms-or-duration - Delay as milliseconds (non-negative Long) or java.time.Duration
  f - Function to execute after delay

Returns a ScheduledFuture for cancellation.
cljs
(delegate-scheduled ms f)

Schedule work for delayed execution.

Use for sleep, timeout, and other time-based operations.

Args: ms - Delay in milliseconds (non-negative integer) f - Function to execute after delay

Returns a function that cancels the timeout via clearTimeout.

Schedule work for delayed execution.

Use for sleep, timeout, and other time-based operations.

Args:
  ms - Delay in milliseconds (non-negative integer)
  f - Function to execute after delay

Returns a function that cancels the timeout via clearTimeout.
raw docstring

delegate-syncclj/s

(delegate-sync f)

Execute work synchronously on the current thread.

Use for lightweight operations that complete immediately, such as grounding already-resolved values or synchronous transforms.

Returns nil (no cancellation handle - work completes before returning).

Execute work synchronously on the current thread.

Use for lightweight operations that complete immediately,
such as grounding already-resolved values or synchronous transforms.

Returns nil (no cancellation handle - work completes before returning).
raw docstring

delegate-virtualclj/s

(delegate-virtual f)

Queue work for async execution on virtual threads (CLJ) or microtask queue (CLJS).

Use for IO-bound operations: network calls, file IO, and other blocking work. This is the default delegator for tasks.

Returns a cancellation handle:

  • CLJ: Future (cancel via Future/.cancel)
  • CLJS: Function that aborts the task's AbortController
Queue work for async execution on virtual threads (CLJ) or microtask queue (CLJS).

Use for IO-bound operations: network calls, file IO, and other blocking work.
This is the default delegator for tasks.

Returns a cancellation handle:
- CLJ: Future (cancel via Future/.cancel)
- CLJS: Function that aborts the task's AbortController
raw docstring

scheduling-executorclj

Single-thread executor for scheduling delayed tasks (sleep, timeout).

Single-thread executor for scheduling delayed tasks (sleep, timeout).
raw docstring

virtual-executorclj

Virtual thread executor for IO-bound tasks. Creates a new virtual thread per task. Default executor for tasks - use for network calls, file IO, and blocking operations.

Virtual thread executor for IO-bound tasks. Creates a new virtual thread per task.
Default executor for tasks - use for network calls, file IO, and blocking operations.
raw 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