[concurrency-interest] PooledExecutor vs java.util.concurrent

David Holmes dholmes at dltech.com.au
Tue May 17 21:22:20 EDT 2005

Jonathan Baxter wrote:
> Suffice it to say there are plenty of use cases, and that the old
> concurrent
> code supported this easily. It is somewhat surprising that that the new
> package makes this almost impossible to do in an elegant way.

I have to agree. Using blocking for flow control is extremely reasonable.
I'm quite surprised that this has turned out to be so difficult.

Defining a RejectedExecutionHandler that interacts with the queue to do a
blocking put seems like a reasonable approach in principle, but there are no
guarantees it will work as you don't know what the pool does with a command
before submitting to the queue (ie wrapping in some internal housekeeping

David Holmes

More information about the Concurrency-interest mailing list