Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
Notify puts before the take blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalobarias committed Mar 27, 2024
1 parent a932278 commit 0e08868
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public synchronized String take(
}

// The take inserts itself in the waiting queue and then blocks
notifyAll();
this.waitingQueue.put(seqNumber, pattern);
while (seqNumber != this.canTake) {
wait();
Expand Down

0 comments on commit 0e08868

Please sign in to comment.