Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8247974

ForkJoinPool's invokeAll(...) method should better be named submitAll(...)

XMLWordPrintable

      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).


            martin Martin Buchholz
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: