Skip to content

Commit

Permalink
fixup
Browse files Browse the repository at this point in the history
remove async execution; previously this method was also called from an Actor thread. Now it is always called from the timer thread and the thread indirection is no longer necessary
  • Loading branch information
pihme committed Mar 14, 2022
1 parent b1621a4 commit cf345b8
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import java.util.List;
import java.util.Timer;
import java.util.TimerTask;
import java.util.concurrent.CompletableFuture;

/**
* Monitor that monitors whether the engine is busy or in idle state. Busy state is a state in which
Expand Down Expand Up @@ -67,8 +66,7 @@ private synchronized void scheduleStateNotification() {
}

private boolean isInIdleState() {
return CompletableFuture.supplyAsync(() -> streamProcessor.hasProcessingReachedTheEnd().join())
.join();
return streamProcessor.hasProcessingReachedTheEnd().join();
}

@Override
Expand Down

0 comments on commit cf345b8

Please sign in to comment.