(ns apio.concurrency.core
  (import (java.util.concurrent ForkJoinPool)))

;; TODO: initialize forkjoin pool in dynamic context
;; using dynamic loaded configuration.
(def *thread-pool* (ForkJoinPool.))

(ns apio.concurrency.core
  (import (java.util.concurrent Executors)))

;; TODO: initialize forkjoin pool in dynamic context
;; using dynamic loaded configuration.

(defn num-processes [] (.availableProcessors Runtime/getRuntime))
(def *thread-pool* (Executors/newFixedThreadPool (* (num-processes) 2)))

Replace forkjoin with standard fixed thread pool.
Replace forkjoin with standard fixed thread pool.

niwinz/apio.clj