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

ForkJoinPool.commonPool().close() spins

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 19
    • 19
    • core-libs
    • None

      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.

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

              Created:
              Updated:
              Resolved: