Skip to content

Commit

Permalink
Issue #7650 - Fix race condition when stopping QueuedThreadPool (#9325)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
3 people committed Feb 8, 2023
1 parent 0a4a077 commit 40f7fc8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,11 @@ protected void doStop() throws Exception
}

// Close any un-executed jobs
while (!_jobs.isEmpty())
while (true)
{
Runnable job = _jobs.poll();
if (job == null)
break;
if (job instanceof Closeable)
{
try
Expand Down

0 comments on commit 40f7fc8

Please sign in to comment.