On 23/09/2011 9:26 AM, Doug Lea wrote:
On 09/22/11 17:45, David Holmes wrote:
Sorry Doug/Chris I should have seen this previously, the order here is
wrong:
1552 void ensurePrestart() {
1553 int wc = workerCountOf(ctl.get());
1554 if (wc == 0)
1555 addWorker(null, false);
1556 else if (wc < corePoolSize)
1557 addWorker(null, true);
1558 }
this will always mark the first worker as non-core even if the
corePoolSize is >
0. It needs to be swapped
Where "needs" means "to be even more accommodating".
I agree; done.
Sorry Doug I put too much weight on the "core" argument to addWorker. I
assumed it was flagging this worker as a core-thread (or not) and so
subject to core-thread timeout rules (or not). But it isn't - which of
course I should know. ;-)
David
-Doug