* Issue #7650 - Fix race condition when stopping QueuedThreadPool Signed-off-by: Dominik Zöchbauer <dominik@zoechbauer.info> Co-authored-by: Greg Wilkins <gregw@webtide.com> Co-authored-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
0a4a077819
commit
40f7fc8510
|
@ -288,9 +288,11 @@ public class QueuedThreadPool extends ContainerLifeCycle implements ThreadFactor
|
|||
}
|
||||
|
||||
// Close any un-executed jobs
|
||||
while (!_jobs.isEmpty())
|
||||
while (true)
|
||||
{
|
||||
Runnable job = _jobs.poll();
|
||||
if (job == null)
|
||||
break;
|
||||
if (job instanceof Closeable)
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Reference in New Issue