Facilities for async programming and communication.
go blocks are dispatched over an internal thread pool, which
defaults to 8 threads. The size of this pool can be modified using
the Java system property clojure.core.async.pool-size
.
Set Java system property clojure.core.async.go-checking
to true
to validate go blocks do not invoke core.async blocking operations.
Property is read once, at namespace load time. Recommended for use
primarily during development. Invalid blocking calls will throw in
go block threads - use Thread.setDefaultUncaughtExceptionHandler()
to catch and handle.
Use the Java system property clojure.core.async.executor-factory
to specify a function that will provide ExecutorServices for
application-wide use by core.async in lieu of its defaults. The
property value should name a fully qualified var. The function
will be passed a keyword indicating the context of use of the
executor, and should return either an ExecutorService, or nil to
use the default. Results per keyword will be cached and used for
the remainder of the application. Possible context arguments are:
:io - used in async/io-thread, for :io workloads in flow/process, and for dispatch handling if no explicit dispatch handler is provided (see below)
:mixed - used by async/thread and for :mixed workloads in flow/process
:compute - used for :compute workloads in flow/process
:core-async-dispatch - used for completion fn handling (e.g. in put! and take!, as well as go block IOC thunk processing) throughout core.async. If not supplied the ExecutorService for :io will be used instead.
The set of contexts may grow in the future so the function should return nil for unexpected contexts.
Facilities for async programming and communication. go blocks are dispatched over an internal thread pool, which defaults to 8 threads. The size of this pool can be modified using the Java system property `clojure.core.async.pool-size`. Set Java system property `clojure.core.async.go-checking` to true to validate go blocks do not invoke core.async blocking operations. Property is read once, at namespace load time. Recommended for use primarily during development. Invalid blocking calls will throw in go block threads - use Thread.setDefaultUncaughtExceptionHandler() to catch and handle. Use the Java system property `clojure.core.async.executor-factory` to specify a function that will provide ExecutorServices for application-wide use by core.async in lieu of its defaults. The property value should name a fully qualified var. The function will be passed a keyword indicating the context of use of the executor, and should return either an ExecutorService, or nil to use the default. Results per keyword will be cached and used for the remainder of the application. Possible context arguments are: :io - used in async/io-thread, for :io workloads in flow/process, and for dispatch handling if no explicit dispatch handler is provided (see below) :mixed - used by async/thread and for :mixed workloads in flow/process :compute - used for :compute workloads in flow/process :core-async-dispatch - used for completion fn handling (e.g. in put! and take!, as well as go block IOC thunk processing) throughout core.async. If not supplied the ExecutorService for :io will be used instead. The set of contexts may grow in the future so the function should return nil for unexpected contexts.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close