An abstract base for orchestrator implementations,
implementing a thread-safe shutdown.
|BatchingExecutor<P extends BatchedWorkProcessor>
An executor of works that accepts works from multiple threads, puts them in a queue,
and processes them in batches in a single background thread.
A task that can be scheduled for a run and is guaranteed to never run concurrently,
regardless of the thread pool it's submitted to.