-
Enhancement
-
Resolution: Not an Issue
-
P4
-
None
-
14
A DESCRIPTION OF THE PROBLEM :
The method submit(task) on a ForkJoinPool object returns a Future Object, wheras the invoke(task) method returns the result of the task.
The invokeAll method however returns a collection of future objects (not a collection of results), which is much more similar to the behaviour of the submit method than to the behaviour of the invoke method. So it would be much more intuitive to name this method submitAll.
Renaming the method to submitAll would also help to get rid of confusion with the static invokeAll method on the ForkJoinTask which behaves differently (it returns void).
The method submit(task) on a ForkJoinPool object returns a Future Object, wheras the invoke(task) method returns the result of the task.
The invokeAll method however returns a collection of future objects (not a collection of results), which is much more similar to the behaviour of the submit method than to the behaviour of the invoke method. So it would be much more intuitive to name this method submitAll.
Renaming the method to submitAll would also help to get rid of confusion with the static invokeAll method on the ForkJoinTask which behaves differently (it returns void).