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

ForkJoinPool.commonPool().close() spins

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • 19
    • 19
    • core-libs
    • None

    Description

      The default implementation of ExecutorService.close invokes shutdown and waits for the executor to terminate with awaitTermination. This doesn't play with the FJP common pool where shutdown is no-op and awaitTermination works like awaitQuiescence.

      It doesn't make sense to close the common pool, but if code does invoke its close method then it will spin calling awaitTermination. One option would for commonPool to return a ForkJoinPool that overrides close to just wait forever or have ForkJoinPool override close.

      Attachments

        Issue Links

          Activity

            People

              dl Doug Lea
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: