File tree Expand file tree Collapse file tree 3 files changed +2
-3
lines changed
common/kotlinx-coroutines-core-common/src/channels Expand file tree Collapse file tree 3 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -397,6 +397,7 @@ public class ClosedSendChannelException(message: String?) : CancellationExceptio
397397 * Indicates attempt to [receive][ReceiveChannel.receive] on [isClosedForReceive][ReceiveChannel.isClosedForReceive]
398398 * channel that was closed without a cause. A _failed_ channel rethrows the original [close][SendChannel.close] cause
399399 * exception on receive attempts.
400+ *
401+ * This exception is subclass of [NoSuchElementException] to be consistent with plain collections.
400402 */
401- // todo: explain when this exception is thrown
402403public class ClosedReceiveChannelException (message : String? ) : NoSuchElementException(message)
Original file line number Diff line number Diff line change @@ -43,7 +43,6 @@ internal open class ConflatedChannel<E> : AbstractChannel<E>() {
4343 when (sendResult) {
4444 null -> return OFFER_SUCCESS
4545 is Closed <* > -> return sendResult
46- else -> Unit // todo:KLUDGE: works around native BE bug
4746 }
4847 // otherwise there was receiver in queue, retry super.offerInternal
4948 }
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ internal open class LinkedListChannel<E> : AbstractChannel<E>() {
3333 when (sendResult) {
3434 null -> return OFFER_SUCCESS
3535 is Closed <* > -> return sendResult
36- else -> Unit // todo:KLUDGE: works around native BE bug
3736 }
3837 // otherwise there was receiver in queue, retry super.offerInternal
3938 }
You can’t perform that action at this time.
0 commit comments