(blocking-thread-pool) Add isTerminated convenience function

This commit is contained in:
Viktor Lofgren 2023-09-21 12:47:41 +02:00
parent f8050816ac
commit 4aa47e87f2

View File

@ -120,6 +120,10 @@ public class SimpleBlockingThreadPool {
return taskCount.get();
}
public boolean isTerminated() {
return shutDown && getActiveCount() == 0;
}
public interface Task {
void run() throws Exception;
}