mirabelle.pool

dynamic-thread-pool-executor

(dynamic-thread-pool-executor registry executor-name {:keys [core-pool-size max-pool-size keep-alive-time queue-size], :or {core-pool-size 1, max-pool-size 8, keep-alive-time 5000, queue-size 10000}})

a ThreadPoolExecutor with core and maximum threadpool sizes, and a LinkedBlockingQueue of a given size. Options:

  • :core-pool-size Default 1
  • :max-pool-size Default 8
  • :keep-alive-time Default 5000 (milliseconds)
  • :queue-size Default 10000

fixed-thread-pool-executor

(fixed-thread-pool-executor size)

schedule!

(schedule! f {:keys [initial-delay-ms interval-ms]})

shutdown

(shutdown executor)

Graceful shutdown of an executor

thread-pool-executor-metrics

(thread-pool-executor-metrics registry executor executor-name)

Register metrics for a threadPoolExecutor