Shut down the thread pool when required.
Shut down the thread pool when required. This will interrupt all threads and clear the worker and the scheduler queues.
Usually this is not needed in application code. Call this method in a situation when work has to be stopped immediately.
A cached pool that increases its thread count whenever a blocking molecule is emitted, and decreases afterwards. The
BlockingIdle
function, similar toscala.concurrent.blocking
, is used to annotate expressions that should lead to an increase of thread count, and to a decrease of thread count once the idle blocking call returns.