ClojureDocs

Nav

Namespaces

set-agent-send-off-executor!

clojure.core

Available since 1.5 (source)
  • (set-agent-send-off-executor! executor)
Sets the ExecutorService to be used by send-off
1 Example
;; This permanently change the thread pool used by agents receiving 
;; tasks with "send-off". Use this to control thread pools of applications
;; you don't own.

(import '[java.util.concurrent Executors])
(def fj-pool (Executors/newWorkStealingPool 20))
(set-agent-send-off-executor! fj-pool)
See Also

Sets the ExecutorService to be used by send

Added by reborg

Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread supplied ...

Added by reborg

Initiates a shutdown of the thread pools that back the agent system. Running actions will complete...

Added by pdbrown
0 Notes
No notes for set-agent-send-off-executor!