net.core.concurrent

Simple wrapper for basic j.u.concurrent tasks (or future alternatives)

exception-catcher

(exception-catcher x)

Executable

protocol

members

submit!

(submit! executor-service f)

Submits the fn to specified executor, returns a Future

executor

(executor type)(executor type {:keys [thread-factory num-threads], :or {num-threads 1, thread-factory (Executors/defaultThreadFactory)}})

Returns ExecutorService. type can be :single, :cached, :fixed or :scheduled, this matches the corresponding Java instances

uncaught-catching-thread-factory

(uncaught-catching-thread-factory catcher-fn)

with-executor

macro

(with-executor executor & body)