@Override
    public synchronized void start() {
        if (isStopping.get()) {
            throw new IllegalStateException(LogUtil.message(
                    "Attempt to start parallel executor '{}' when it is shutting down.",
                    threadNamePrefix));
        }
        if (!isStopped.get()) {
            throw new IllegalStateException(LogUtil.message(
                    "Attempt to start parallel executor '{}' when it is already started",
                    threadNamePrefix));
        }

        LOGGER.debug("Starting parallel executor '{}', threadCount: {}",
                threadNamePrefix, threadCount);
        // Start.
        for (int i = 0; i < threadCount; i++) {
            executorService.execute(this::run);
        }
        isStopped.set(false);
    }
If true, pause the executor's threads after they have completed their current task.
if false, resume all the executor's threads.
If already in the desired state, is a noop.
stroom-proxy/stroom-proxy-repo/src/main/java/stroom/proxy/repo/ParallelExecutor.java