Liking cljdoc? Tell your friends :D

promesa.exec

Executors & Schedulers facilities.

Executors & Schedulers facilities.
raw docstring

cached-executorclj

(cached-executor & {:keys [factory]})

A cached thread executor pool constructor.

A cached thread executor pool constructor.
sourceraw docstring

cached-poolcljdeprecated

(cached-pool)
(cached-pool opts)

A cached thread pool constructor.

A cached thread pool constructor.
sourceraw docstring

default-executorclj/s

source

default-forkjoin-thread-factoryclj/s

(default-forkjoin-thread-factory &
                                 {:keys [name daemon]
                                  :or {name "promesa/forkjoin/%s" daemon true}})
source (clj)source (cljs)

default-schedulerclj/s

source

default-thread-factoryclj

(default-thread-factory &
                        {:keys [name daemon priority]
                         :or {daemon true priority Thread/NORM_PRIORITY}})
source

executor?clj/s

(executor? o)
source

fixed-executorclj

(fixed-executor & {:keys [parallelism factory]})

A fixed thread executor pool constructor.

A fixed thread executor pool constructor.
sourceraw docstring

fixed-poolcljdeprecated

(fixed-pool n)
(fixed-pool n opts)

A fixed thread pool constructor.

A fixed thread pool constructor.
sourceraw docstring

forkjoin-executorclj

(forkjoin-executor & {:keys [factory async? parallelism] :or {async? true}})
source

forkjoin-poolcljdeprecated

(forkjoin-pool {:keys [factory async? parallelism] :or {async? true} :as opts})
source

processorsclj

source

resolve-executorclj/s

(resolve-executor)
(resolve-executor executor)
source

resolve-schedulerclj/s

(resolve-scheduler)
(resolve-scheduler scheduler)
source

run!clj/s

(run! task)
(run! executor task)

Run the task in the provided executor.

Run the task in the provided executor.
sourceraw docstring

same-thread-executorclj/s

source

schedule!clj/s

(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.
sourceraw docstring

scheduled-executorclj

(scheduled-executor & {:keys [parallelism factory] :or {parallelism 1}})

A scheduled thread pool constructor.

A scheduled thread pool constructor.
sourceraw docstring

scheduled-poolcljdeprecated

(scheduled-pool)
(scheduled-pool n)
(scheduled-pool n opts)

A scheduled thread pool constructor.

A scheduled thread pool constructor.
sourceraw docstring

single-executorclj

(single-executor & {:keys [factory]})

A single thread executor pool constructor.

A single thread executor pool constructor.
sourceraw docstring

single-poolcljdeprecated

(single-pool)
(single-pool opts)

A single thread pool constructor.

A single thread pool constructor.
sourceraw docstring

submit!clj/s

(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.
sourceraw docstring

thread-factory?clj

(thread-factory? o)
source

with-dispatchclj/smacro

(with-dispatch executor & body)

Helper macro for dispatch execution of the body to an executor service. The returned promise is not cancellable (the body will be executed independently of the cancellation).

Helper macro for dispatch execution of the body to an executor
service. The returned promise is not cancellable (the body will be
executed independently of the cancellation).
sourceraw docstring

work-stealing-executorclj

(work-stealing-executor & {:keys [parallelism]})

Creates a work-stealing thread pool.

Creates a work-stealing thread pool.
sourceraw docstring

work-stealing-poolcljdeprecated

(work-stealing-pool)
(work-stealing-pool n)

Creates a work-stealing thread pool.

Creates a work-stealing thread pool.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close