Better be careful with executors: If they are shutting down, no new tasks may be submitted - otherwise, we will just trigger another pointless exception. Secondly, if we increment the number of active executors and only afterwards actually submit the task, we have to make sure that the submission goes through - otherwise out counter is off by one! I now decrement it again if the executor rejects the new task.