[concurrency-interest] Fwd: ThreadPoolTask

David Holmes dcholmes at optusnet.com.au
Mon Jul 10 22:53:33 EDT 2006

Peter Veentjer writes:
> With your example you need also an extra thread to suck on the channel
> to retrieve messages and submit the task to the executor.
> The executor is good for a push model and the repeater for a pull model.

I disagree. Having only one thread blocking waiting for new work is
typically a desirable characteristic. But there is no reason that the pool
threads can't block waiting for work either - depends on whether your pool
is dedicated to this kind of task or not.

Semantically you have to decide whether a "task" represents a one-off action
"process this data", or it is a repetitive action "keep processing data".


More information about the Concurrency-interest mailing list