Skip to content

Commit

Permalink
[FLINK-21104][task] Ease debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
Arvid Heise authored and pnowojski committed Jan 30, 2021
1 parent a6b909c commit 393f64f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.ReentrantLock;

Expand Down Expand Up @@ -133,7 +134,8 @@ public Optional<Mail> tryTake(int priority) {
try {
Mail headMail;
while ((headMail = takeOrNull(queue, priority)) == null) {
notEmpty.await();
// to ease debugging
notEmpty.await(1, TimeUnit.SECONDS);
}
hasNewMail = !queue.isEmpty();
return headMail;
Expand Down

0 comments on commit 393f64f

Please sign in to comment.