Skip to content

Commit

Permalink
update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Scottmitch committed Oct 4, 2022
1 parent 7d6fc7b commit 4c8807d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,8 @@ private T take0(BiLongFunction<TimeUnit, T> taker, long timeout, TimeUnit unit)
}
} else {
final ThreadStamp nextStamp2;
// Count should be > 0, but check <=1 for best effort recovery in case SPSC isn't honored.
// Count maybe == 0 if a previous consumer already consumed data before PRODUCER updated the
// threadStamp (done after insertion) and this consumer also doesn't see the PRODUCER state yet.
if (currStamp.count <= 1) {
nextStamp2 = null;
} else {
Expand Down

0 comments on commit 4c8807d

Please sign in to comment.