Skip to content

Commit 64e49dc

Browse files
committed
Undeprecate ReceiveChannel.receiveOrNull, but leave its obsolete status
1 parent e321394 commit 64e49dc

File tree

1 file changed

+1
-2
lines changed
  • common/kotlinx-coroutines-core-common/src/channels

1 file changed

+1
-2
lines changed

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,9 @@ public interface ReceiveChannel<out E> {
210210
* **Note: This is an obsolete api.**
211211
* This function will be replaced with `receiveOrClosed: ReceiveResult<E>` and
212212
* extension `suspend fun <E: Any> ReceiveChannel<E>.receiveOrNull(): E?`
213+
* It is obsolete because it does not distinguish closed channel and null elements.
213214
*/
214-
@ExperimentalCoroutinesApi
215215
@ObsoleteCoroutinesApi
216-
@Deprecated(level = DeprecationLevel.WARNING, message = "This method does not distinguish closed channel and null elements")
217216
public suspend fun receiveOrNull(): E?
218217

219218
/**

0 commit comments

Comments
 (0)