Skip to content

Commit 1e70839

Browse files
committed
Remove TODO in channels
1 parent ab1ae7f commit 1e70839

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

common/kotlinx-coroutines-core-common/src/channels/Channel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff 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
402403
public class ClosedReceiveChannelException(message: String?) : NoSuchElementException(message)

common/kotlinx-coroutines-core-common/src/channels/ConflatedChannel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

common/kotlinx-coroutines-core-common/src/channels/LinkedListChannel.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)