wil*_*nux 6 clojure core.async
线程池实现在core.async Clojure的库使用尺寸=芯*2 + 42#的FixedThreadPoolExecutor.
(defonce the-executor
(Executors/newFixedThreadPool
(-> (Runtime/getRuntime)
(.availableProcessors)
(* 2)
(+ 42))
(conc/counted-thread-factory "async-dispatch-%d" true)))
Run Code Online (Sandbox Code Playgroud)
是否有理由使用这些数字(核心数乘以2加42)?这对所有设备都是最佳的吗?我只是想知道丰富的hickey(和贡献者)如何用这些数字来解决.
谢谢nullptr.
以下是对有兴趣的人的讨论:http://clojure-log.n01se.net/date/2013-08-29.html#15 : 45a