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

ForkJoinPool trims worker threads too slowly

XMLWordPrintable

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

      Unlike other ExcecutorServices, ForkJoinPool releases (kills and allows GC etc) at most one worker thread per KeepAlive interval, which can be extremely slow. (This problem worsened under JDK-8288899). A better approach, that still conforms to specs and user expectations, is to trigger follow-on trims after the first with almost-immediate deadlines. This would for example shorten a full trim on a 64-thread pool with default 1-minute keepAlive settings from more than an hour to just over a minute.

            dl Doug Lea
            dl Doug Lea
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: