Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
if (!executorThreadsStarted) { synchronized (this) { // To ensure all requests are first queued, make coreThreads = // maxThreads // and pre-start all the Core Threads. executor.prestartAllCoreThreads(); executorThreadsStarted = true; } }
It is possible that two threads executing the above code both see executorThreadsStarted as being false, leading to executor.prestartAllCoreThreads() called twice.