You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: core/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/channels/ArrayBroadcastChannel.kt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -339,8 +339,9 @@ class ArrayBroadcastChannel<E>(
339
339
val closedBroadcast = broadcastChannel.closedForReceive // unguarded volatile read
340
340
val tail = broadcastChannel.tail // unguarded volatile read
341
341
if (subHead >= tail) {
342
-
// no elements to poll from the queue -- check if closed
343
-
return closedBroadcast ?:POLL_FAILED// must retest `needsToCheckOfferWithoutLock` outside of the lock
342
+
// no elements to poll from the queue -- check if closed broads & closed this sub
343
+
// must retest `needsToCheckOfferWithoutLock` outside of the lock
Copy file name to clipboardExpand all lines: core/kotlinx-coroutines-core/src/test/kotlin/kotlinx/coroutines/experimental/channels/ArrayBroadcastChannelTest.kt
0 commit comments