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

Document that ForkJoinWorkerThreadFactory.newThread can return null to reject request

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: core-libs

      Description

      ThreadFactory.newThread is documented to return null if the request is rejected. The very similar ForkJoinWorkerThreadFactory should do likewise

           * @return constructed thread, or {@code null} if the request to
           * create a thread is rejected
           */
          Thread newThread(Runnable r);

               * @return the new worker thread, or {@code null} if the request
               * to create a thread is rejected
               * @throws NullPointerException if the pool is null
               */
              public ForkJoinWorkerThread newThread(ForkJoinPool pool);

        Attachments

          Activity

            People

            Assignee:
            martin Martin Buchholz
            Reporter:
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: