Liking cljdoc? Tell your friends :D

promesa.exec

Executors & Schedulers facilities.

Executors & Schedulers facilities.
raw docstring

*default-executor*clj/s

source

*default-scheduler*clj/s

source

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

configure-default-executor!clj

(configure-default-executor! & params)
source

counterclj

source

default-executorclj/s

A global, default executor service.

A global, default executor service.
sourceraw docstring

default-forkjoin-thread-factoryclj

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

default-schedulerclj/s

A global, default scheduler executor service.

A global, default scheduler executor service.
sourceraw docstring

default-thread-factoryclj

(default-thread-factory
  &
  {:keys [name daemon priority]
   :or {daemon true priority Thread/NORM_PRIORITY name "promesa/thread/%s"}})
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

noopclj/s

source

pmapclj

(pmap f coll)
(pmap f coll & colls)

Analogous to the clojure.core/pmap with the excetion that it allows use a custom executor (binded to default-executor var) The default clojure chunk size (32) is used for evaluation and the real parallelism is determined by the provided executor.

EXPERIMENTAL API: This function should be considered EXPERIMENTAL and may be changed or removed in future versions until this notification is removed.

Analogous to the `clojure.core/pmap` with the excetion that it allows
use a custom executor (binded to *default-executor* var) The default
clojure chunk size (32) is used for evaluation and the real
parallelism is determined by the provided executor.


EXPERIMENTAL API: This function should be considered EXPERIMENTAL
and may be changed or removed in future versions until this
notification is removed.
sourceraw docstring

resolve-executorclj/s

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

resolve-schedulerclj/s

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

run!clj/s

(run! f)
(run! executor f)

Run the task in the provided executor.

Run the task in the provided executor.
sourceraw docstring

same-thread-executorclj/s

A global thread executor that uses the same thread to run the code.

A global thread executor that uses the same thread to run the code.
sourceraw docstring

schedule!clj/s

(schedule! ms f)
(schedule! scheduler ms f)

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

shutdown!clj/s

(shutdown! executor)

Shutdowns the executor service.

Shutdowns the executor service.
sourceraw docstring

shutdown-now!clj/s

(shutdown-now! executor)

Shutdowns and interrupts the executor service.

Shutdowns and interrupts the executor service.
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! f)
(submit! executor f)

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-executorclj/s

A global, thread per task executor service.

A global, thread per task executor service.
sourceraw docstring

thread-factory?clj

(thread-factory? o)
source

vthread-executorclj/s

A global, virtual thread per task executor service.

A global, virtual thread per task executor service.
sourceraw docstring

vthreads-supported?clj/s

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

with-executorclj/smacro

(with-executor executor & body)

Binds the default-executor var with the provided executor, executes the macro body. It also can optionally shutdown or shutdown and interrupt on termination if you provide ^:shutdown and ^:interrupt metadata.

EXPERIMENTAL API: This function should be considered EXPERIMENTAL and may be changed or removed in future versions until this notification is removed.

Binds the *default-executor* var with the provided executor,
executes the macro body. It also can optionally shutdown or shutdown
and interrupt on termination if you provide `^:shutdown` and
`^:interrupt` metadata.

EXPERIMENTAL API: This function should be considered EXPERIMENTAL
and may be changed or removed in future versions until this
notification is removed.
sourceraw docstring

work-stealing-executorclj

(work-stealing-executor & params)

An alias for the forkjoin-executor.

An alias for the `forkjoin-executor`.
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

wrap-bindingsclj/s

(wrap-bindings f)
source

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

× close