Skip to content

Commit

Permalink
Fixes #6652 - Improve ReservedThreadExecutor dump.
Browse files Browse the repository at this point in the history
Updated doStop() to interrupt non-null threads.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Aug 24, 2021
1 parent 85611e5 commit dbeb090
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -19,6 +19,7 @@
package org.eclipse.jetty.util.thread;

import java.io.IOException;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.Executor;
Expand Down Expand Up @@ -196,6 +197,7 @@ public void doStop() throws Exception
_threads.stream()
.filter(ReservedThread::isReserved)
.map(t -> t._thread)
.filter(Objects::nonNull)
.forEach(Thread::interrupt);
_threads.clear();
_count.getAndSetHi(0);
Expand Down

0 comments on commit dbeb090

Please sign in to comment.