Menu

#7 There is no superclass of ParallelTaskGroup/SequentialTaskGroup that works with TaskExecutor.execute()

0.9.2-beta
open
nobody
None
1
2014-06-24
2014-06-24
No

Context:

ParallelTaskGroup<ravenwoodassociatedtablecount> taskGroup;
taskGroup = new ParallelTaskGroup<ravenwoodassociatedtablecount>();
// ...
associatedTableCounts = TaskExecutor.execute(taskGroup);</ravenwoodassociatedtablecount></ravenwoodassociatedtablecount>

I would like to easily switch from ParallelTaskGroup to SequentialTaskGroup however neither TaskGroup nor AbstractTaskGroup implement the Callable interface and execute() will not accept them.

I suggest AbstractTaskGroup should extend Callable, or a new abstract superclass of ParallelTaskGroup and SequentialTaskGroup should be added that implements Callable. Another suggestion is to make ParallelTaskGroup a subclass of SequentialTaskGroup but that may be confusing.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB