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

ScheduledThreadPoolExecutor JavaDoc describes it wrongly as a fixed-size pool

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 8u66
    • core-libs

      A DESCRIPTION OF THE REQUEST :
      The JavaDoc of class ScheduledThreadPoolExecutor documents the behavior as a fixed-size ThreadPoolExecutor:

      -- quote --
      While this class inherits from ThreadPoolExecutor, a few of the inherited tuning methods are not useful for it. In particular, because it acts as a fixed-sized pool using corePoolSize threads and an unbounded queue, adjustments to maximumPoolSize have no useful effect.
      -- quote --

      In fact the ScheduledThreadPoolExecutor calls its parent constructor with Integer.MAX_VALUE as maximumPoolSize.

      JUSTIFICATION :
      Misleading documentation can lead to wrong error analysis or system performance estimations.


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

              Created:
              Updated:
              Resolved: