Skip to content

Commit 4c8807d

Browse files
committed
update comment
1 parent 7d6fc7b commit 4c8807d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

servicetalk-concurrent-api/src/main/java/io/servicetalk/concurrent/api/PublisherAsBlockingIterable.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,8 @@ private T take0(BiLongFunction<TimeUnit, T> taker, long timeout, TimeUnit unit)
579579
}
580580
} else {
581581
final ThreadStamp nextStamp2;
582-
// Count should be > 0, but check <=1 for best effort recovery in case SPSC isn't honored.
582+
// Count maybe == 0 if a previous consumer already consumed data before PRODUCER updated the
583+
// threadStamp (done after insertion) and this consumer also doesn't see the PRODUCER state yet.
583584
if (currStamp.count <= 1) {
584585
nextStamp2 = null;
585586
} else {

0 commit comments

Comments
 (0)