title: How to make ThreadPoolExecutor's submit() method block if it is saturated?
body: <p>I want to create a <code>ThreadPoolExecutor</code> such that when it has reached its maximum size and the queue is full, the <code>submit()</code> method <strong>blocks</strong> when trying to add new tasks. Do I need to implement a custom <code>RejectedExecutionHandler</code> for that or is there an existing way to do this using a standard Java library?</p>