On 27 July 2011 19:21, Greg Brown <gk_br...@verizon.net> wrote:
> The ExecutorService given to TaskGroup and TaskSequence is used to execute 
> the root task (the group or sequence). It just isn't used to execute the 
> sub-tasks.

Fair enough, but as I said, the intent is far from clear, even with
access to the source.

IMHO this fails the often quoted 'might confuse users' test miserably.
(Partly because I am a user, and this left me miserable after
confusing me!)

>If you want the sub-tasks to use the same executor service, you can just pass 
>that service instance to the sub-task constructor.  If you pass the fixed 
>thread pool service to each of your individual tasks, you will get the 
>behavior you want.

Yes, that is what I discovered.  I end up having to tell the task how
it will be executed when it is created.  Or wrapping one task in
another task just to be able to specify the ExecutorService at a later
point.

But by then I couldn't really see what these classes offer.

Reply via email to