[concurrency-interest] Fwd: ThreadPoolTask

David Holmes dcholmes at optusnet.com.au
Mon Jul 10 02:53:34 EDT 2006

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.

David Holmes

More information about the Concurrency-interest mailing list