Liking cljdoc? Tell your friends :D
Clojure only.

qdolor.worker-pool.impl.vthreads

Worker pool implementation backed by Java virtual threads (JDK 21+) or a fixed platform thread pool.

Shutdown is coordinated via an atom. stop! blocks on each worker future until it exits its current iteration.

Worker pool implementation backed by Java virtual threads (JDK 21+) or a
fixed platform thread pool.

Shutdown is coordinated via an atom. `stop!` blocks on each worker future
until it exits its current iteration.
raw docstring

vt-worker-poolclj

(vt-worker-pool {:keys [queue-backend task-config num-workers poll-interval-ms
                        backend-opt worker-loop-fn]
                 :or {poll-interval-ms 1000
                      worker-loop-fn qd/default-worker-loop}})

Constructs a WorkerPool backed by Java virtual threads (JDK 21+).

Options:

  • :queue-backend — a QBackend instance
  • :task-config — task configuration map passed to make-qtask
  • :num-workers — number of concurrent workers
  • :poll-interval-ms — milliseconds to sleep between queue polls (default 1000)
  • :backend-opt — pass :platform-threads to force a fixed daemon thread pool, e.g. on JDK < 21
  • :worker-loop-fn - A function that will be called on each worker iteration Defaults to qdolor.core/default-worker-loop
Constructs a `WorkerPool` backed by Java virtual threads (JDK 21+).

Options:

- `:queue-backend`    — a `QBackend` instance
- `:task-config`      — task configuration map passed to `make-qtask`
- `:num-workers`      — number of concurrent workers
- `:poll-interval-ms` — milliseconds to sleep between queue polls (default 1000)
- `:backend-opt`      — pass `:platform-threads` to force a fixed daemon
                        thread pool, e.g. on JDK < 21
- `:worker-loop-fn`   - A function that will be called on each worker iteration
                        Defaults to qdolor.core/default-worker-loop
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