The threadpool implementation in the core.async clojure library uses a FixedThreadPoolExecutor of size = # from kernels * 2 + 42.
(defonce the-executor (Executors/newFixedThreadPool (-> (Runtime/getRuntime) (.availableProcessors) (* 2) (+ 42)) (conc/counted-thread-factory "async-dispatch-%d" true)))
Is there any reason to use these numbers (in particular, the number of cores 2 plus 42)? Is this optimal for all devices? I just want to know how rich hickeys (and participants) settled with these numbers.
Thanks, nullptr.
Here is a discussion for those interested: http://clojure-log.n01se.net/date/2013-08-29.html#15:45a
source share