Skip to content

Commit

Permalink
Interruption needs to be handled through the exception handling mecha…
Browse files Browse the repository at this point in the history
…nism (#480)
  • Loading branch information
pivovarit authored Apr 25, 2020
1 parent 32709c2 commit 4d3cba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/pivovarit/collectors/Dispatcher.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void start() {
started = true;
dispatcher.execute(() -> {
try {
while (!Thread.currentThread().isInterrupted()) {
while (true) {
Runnable task;
if ((task = workingQueue.take()) != POISON_PILL) {
limiter.acquire();
Expand Down

0 comments on commit 4d3cba2

Please sign in to comment.