Executors & Schedulers facilities.
Executors & Schedulers facilities.
(cached-pool)
(cached-pool opts)
A cached thread pool constructor.
A cached thread pool constructor.
(fixed-pool n)
(fixed-pool n opts)
A fixed thread pool constructor.
A fixed thread pool constructor.
(forkjoin-pool {:keys [factory async? parallelism] :or {async? true} :as opts})
(run! task)
(run! executor task)
Run the task in the provided executor.
Run the task in the provided executor.
(schedule! ms task)
(schedule! scheduler ms task)
Schedule a callable to be executed after the ms
delay
is reached.
In JVM it uses a scheduled executor service and in JS
it uses the setTimeout
function.
Schedule a callable to be executed after the `ms` delay is reached. In JVM it uses a scheduled executor service and in JS it uses the `setTimeout` function.
(scheduled-pool)
(scheduled-pool n)
(scheduled-pool n opts)
A scheduled thread pool constructo.
A scheduled thread pool constructo.
(single-pool)
(single-pool opts)
A single thread pool constructor.
A single thread pool constructor.
(submit! task)
(submit! executor task)
Submit a task to be executed in a provided executor and return a promise that will be completed with the return value of a task.
A task is a plain clojure function.
Submit a task to be executed in a provided executor and return a promise that will be completed with the return value of a task. A task is a plain clojure function.
(work-stealing-pool)
(work-stealing-pool n)
Creates a work-stealing thread pool.
Creates a work-stealing thread pool.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close