[concurrency-interest] Fwd: ThreadPoolTask

Peter Veentjer alarmnummer at gmail.com
Mon Jul 10 03:15:55 EDT 2006

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.

On 7/10/06, David Holmes <dcholmes at optusnet.com.au> wrote:
> I wrote:
> > So if I'm understanding this right, what you have done is to invert the
> > classic producer consumer loop so that instead of having a consumer thread
> > doing:
> >
> >    while ((parseTask = channel.take()) != STOP_TASK) { // just an example
> >        executeor.execute(new ParsingTask(parseTask));
> >    }
> Just a note to the general audience that in this classic usage, the executor
> repeatedly executes the same task logic, it just uses a different task
> instance to hold the data for the current execution. This all seems to boil
> down to how the current task execution gets its data.
> Cheers,
> David Holmes
> _______________________________________________
> Concurrency-interest mailing list
> Concurrency-interest at altair.cs.oswego.edu
> http://altair.cs.oswego.edu/mailman/listinfo/concurrency-interest

More information about the Concurrency-interest mailing list