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
397
397
* Indicates attempt to [receive][ReceiveChannel.receive] on [isClosedForReceive][ReceiveChannel.isClosedForReceive]
398
398
* channel that was closed without a cause. A _failed_ channel rethrows the original [close][SendChannel.close] cause
399
399
* exception on receive attempts.
400
+ *
401
+ * This exception is subclass of [NoSuchElementException] to be consistent with plain collections.
400
402
*/
401
- // todo: explain when this exception is thrown
402
403
public 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>() {
43
43
when (sendResult) {
44
44
null -> return OFFER_SUCCESS
45
45
is Closed <* > -> return sendResult
46
- else -> Unit // todo:KLUDGE: works around native BE bug
47
46
}
48
47
// otherwise there was receiver in queue, retry super.offerInternal
49
48
}
Original file line number Diff line number Diff line change @@ -33,7 +33,6 @@ internal open class LinkedListChannel<E> : AbstractChannel<E>() {
33
33
when (sendResult) {
34
34
null -> return OFFER_SUCCESS
35
35
is Closed <* > -> return sendResult
36
- else -> Unit // todo:KLUDGE: works around native BE bug
37
36
}
38
37
// otherwise there was receiver in queue, retry super.offerInternal
39
38
}
You can’t perform that action at this time.
0 commit comments