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

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

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 14
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

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


        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: