[concurrency-interest] BoundedPriorityBlockingQueue ?

Tim Peierls tim at peierls.net
Tue Sep 12 23:06:12 EDT 2006


On 9/12/06, Dhanji R. Prasanna <dhanji at gmail.com> wrote:
>
> If there are mission critical differences I certainly would not trust them
> to the same threadpool.
>

Building that lack of trust into task submission code might also be a
mistake.

Maybe this is obvious to all, but here's a reminder: Sometimes the best
strategy is not to settle definitively on a particular strategy but to
encapsulate the execution policy within an Executor or ExecutorService. That
way, by changing the concrete type of an Executor and without affecting the
client code, you can change your mind at deploy time about whether to use
separate thread pools.

Then you can measure the effectiveness of different strategies in practice
instead of trying to reason in the abstract about which works better.

--tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20060912/fb0bf128/attachment.html 


More information about the Concurrency-interest mailing list