>> 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.
The same is true of any task - you provide the executor service to the constructor. A TaskGroup or TaskSequence is just a task that executes other tasks. Might it make more sense to pass the executor service to the execute() method, rather than the constructor? That way, the service can easily be propagated to the sub-tasks. > But by then I couldn't really see what these classes offer. They offer exactly what was described earlier in the thread - a means for executing a set of tasks in sequence or in parallel.