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

ForkJoinPool's getQueuedSubmissionCount execution time documentation is wrong

    Details

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

      Description

      A DESCRIPTION OF THE PROBLEM :
      The documentation for ForkJoinPool's getQueuedSubmissionCount method states that it "may take time proportional to the number of submissions".
      However looking at its implementation we can see that there's a loop iterating over all the WorkQueues and calling WorkQueue::queueSize which is O(1).
      The documentation should be changed to something like:
      "This method may take time proportional to the number of threads in the pool"


        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: