Hi Chris, > I wasted too much time yesterday realizing that TaskGroup & > TaskSequence don't use the java.util.concurrent.ExecutorService that > might be passed to their constructors.
If I understand the issue, I think you mean that these classes are not guaranteed to execute their subtasks using the same ExecutorService that they were given. Is that correct? > I can't really work out the intent of the classes from the javadocs or > decide if they are still required (at least in their current forms). > Neither is used within Pivot itself. They are just utility classes for executing a set of tasks in sequence or in parallel. Even though they are not used by the platform, I believe there is a unit test for these classes. > Are they supposed to use a provided ExecutorService or is the > constructor just a copy & paste mistake? Not sure what you mean by this. TaskGroup(ExecutorService) and TaskSequence(ExecutorService) do appear to pass the given executor service to the base class. Am I missing something? > If the former, then it is probably worth adding a > setExecutorService(ExecutorService) method to > org.apache.pivot.util.concurrent.Task so that TaskGroup & TaskSequence > can control the ExecutorService to use when running the individual > tasks. Is the question whether we should enforce that subtasks are executed by the same executor service as their parent? If so, why might we want to do that? G