Liking cljdoc? Tell your friends :D

manifold.executor


execute-poolclj

(execute-pool)
source

executorclj

(executor)
source

executor-thread-localclj

source

fixed-thread-executorclj

(fixed-thread-executor num-threads)
(fixed-thread-executor num-threads options)

Returns an executor which has a fixed number of threads.

Returns an executor which has a fixed number of threads.
sourceraw docstring

instrumented-executorclj

(instrumented-executor {:keys [thread-factory queue-length stats-callback
                               sample-period control-period controller metrics
                               initial-thread-count onto?]
                        :or {initial-thread-count 1
                             sample-period 25
                             control-period 10000
                             metrics (EnumSet/allOf Stats$Metric)
                             onto? true}})

Returns a java.util.concurrent.ExecutorService, using Dirigiste.

|:---|:---- | thread-factory | an optional java.util.concurrent.ThreadFactory that creates the executor's threads. | | queue-length | the maximum number of pending tasks before .execute() begins throwing java.util.concurrent.RejectedExecutionException, defaults to 0. | stats-callback | a function that will be invoked every control-period with the relevant statistics for the executor. | sample-period | the interval, in milliseconds, between sampling the state of the executor for resizing and gathering statistics, defaults to 25. | control-period | the interval, in milliseconds, between use of the controller to adjust the size of the executor, defaults to 10000. | controller | the Dirigiste controller that is used to guide the pool's size. | metrics | an EnumSet of the metrics that should be gathered for the controller, defaults to all. | initial-thread-count | the number of threads that the pool should begin with. | onto? | if true, all streams and deferred generated in the scope of this executor will also be 'on' this executor.

Returns a `java.util.concurrent.ExecutorService`, using [Dirigiste](https://github.com/ztellman/dirigiste).

|:---|:----
| `thread-factory` | an optional `java.util.concurrent.ThreadFactory` that creates the executor's threads. |
| `queue-length` | the maximum number of pending tasks before `.execute()` begins throwing `java.util.concurrent.RejectedExecutionException`, defaults to `0`.
| `stats-callback` | a function that will be invoked every `control-period` with the relevant statistics for the executor.
| `sample-period` | the interval, in milliseconds, between sampling the state of the executor for resizing and gathering statistics, defaults to `25`.
| `control-period` | the interval, in milliseconds, between use of the controller to adjust the size of the executor, defaults to `10000`.
| `controller` | the Dirigiste controller that is used to guide the pool's size.
| `metrics` | an `EnumSet` of the metrics that should be gathered for the controller, defaults to all.
| `initial-thread-count` | the number of threads that the pool should begin with.
| `onto?` | if true, all streams and deferred generated in the scope of this executor will also be 'on' this executor.
sourceraw docstring

register-execute-pool-stats-callbackclj

(register-execute-pool-stats-callback c)

Registers a callback which will be called with execute-pool stats.

Registers a callback which will be called with execute-pool stats.
sourceraw docstring

register-wait-pool-stats-callbackclj

(register-wait-pool-stats-callback c)

Registers a callback which will be called with wait-pool stats.

Registers a callback which will be called with wait-pool stats.
sourceraw docstring

stats->mapclj

(stats->map s)
(stats->map s quantiles)

Converts a Dirigiste Stats object into a map of values onto quantiles.

Converts a Dirigiste `Stats` object into a map of values onto quantiles.
sourceraw docstring

thread-factoryclj

(thread-factory name-generator executor-promise)
(thread-factory name-generator executor-promise stack-size)
(thread-factory name-generator executor-promise stack-size daemon?)
source

unregister-execute-pool-stats-callbackclj

(unregister-execute-pool-stats-callback c)

Unregisters a previous execute-pool stats callback.

Unregisters a previous execute-pool stats callback.
sourceraw docstring

unregister-wait-pool-stats-callbackclj

(unregister-wait-pool-stats-callback c)

Unregisters a previous wait-pool stats callback.

Unregisters a previous wait-pool stats callback.
sourceraw docstring

utilization-executorclj

(utilization-executor utilization)
(utilization-executor utilization max-threads)
(utilization-executor utilization max-threads options)

Returns an executor which sizes the thread pool according to target utilization, within [0,1], up to max-threads. The queue-length for this executor is always 0, and by default has an unbounded number of threads.

Returns an executor which sizes the thread pool according to target utilization, within
`[0,1]`, up to `max-threads`.  The `queue-length` for this executor is always `0`, and by
default has an unbounded number of threads.
sourceraw docstring

wait-poolclj

(wait-pool)
source

with-executorcljmacro

(with-executor executor & body)
source

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

× close