ForkJoinPool trims worker threads too slowly

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 22
    • Affects Version/s: 22
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: