OK, rollback committed to CVS: --- src/main/java/util/concurrent/ThreadPoolExecutor.java 27 Nov 2020 17:42:00 -0000 1.194 +++ src/main/java/util/concurrent/ThreadPoolExecutor.java 8 Dec 2020 20:31:54 -0000 @@ -1522,13 +1522,11 @@ // As a heuristic, prestart enough new workers (up to new // core size) to handle the current number of tasks in // queue, but stop if queue becomes empty while doing so. - /* int k = Math.min(delta, workQueue.size()); while (k-- > 0 && addWorker(null, true)) { if (workQueue.isEmpty()) break; } - */ } }
On Tue, Dec 8, 2020 at 4:04 AM Doug Lea <d...@cs.oswego.edu> wrote: > > On 12/8/20 3:56 AM, Alan Bateman wrote: > >> 1558: break; > >> 1559: } > >> 1560: */ > > Is this meant to be commented out? > Yes, but It should be marked as a possible improvement, not yet > committed. While this (prestarting) would improve performance in some > scenarios, it may also disrupt expectations and even tooling in some > existing usages, which we haven't fully checked out. > >