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

Jonathan Baxter jbaxter at panscient.com
Wed May 18 19:52:54 EDT 2005


On Wednesday 18 May 2005 23:20, Doug Lea wrote:
> I'm away at some meetings (greetings from Dublin) so can't dig them
> out easily at the moment, but the reasons for omitting waitWhenBlocked
> were:
>
> (1) It was the single biggest source of bug-reports in
> dl.util.concurrent because its range of correct operation is
> very small -- you have to use just the right combinations of
> other parameters, and even so there are inherent races you need
> to be aware of. (For example, some common utility in JBoss had
> consequential problems along these lines until they changed it.)
>
> (2) As Tim mentioned, a version supporting it really ought to
> be able to cancel out on interruption, which the new API doesn't
> support (for good reasons).
>
> So my main conclusion here was that if you are smart enough to
> know exactly how you'd like this to work, you don't need
> us to build it for you :-)

Well, that's something you could say of _any_ higher-level API functionality. 
Eg, I'm smart enough to know exactly how I'd like a HashSet to work, but that 
doesn't mean I want to roll my own :-)

Anyway, the old code does the trick for me so I am happy to continue using it. 

- Jonathan 



More information about the Concurrency-interest mailing list