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
Deprecation and migration of receiveOrNull and onReceiveOrNull. (#2612)
* Deprecation and migration of receiveOrNull and onReceiveOrNull.
* Raise deprecation level for members, introduce deprecation for extensions
* Explain rationale behind deprecation
* Provide default implementation for deprecated members in Channel interface
* Get rid of the internal implementation, leverage receiveCatching
* Introduce new extensions for ChannelResult and use them as a replacement in our own operators
Fixes#1676
Copy file name to clipboardExpand all lines: kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
+9
Original file line number
Diff line number
Diff line change
@@ -555,7 +555,9 @@ public abstract interface class kotlinx/coroutines/channels/ActorScope : kotlinx
555
555
556
556
public final class kotlinx/coroutines/channels/ActorScope$DefaultImpls {
557
557
public static synthetic fun cancel (Lkotlinx/coroutines/channels/ActorScope;)V
558
+
public static fun getOnReceiveOrNull (Lkotlinx/coroutines/channels/ActorScope;)Lkotlinx/coroutines/selects/SelectClause1;
558
559
public static fun poll (Lkotlinx/coroutines/channels/ActorScope;)Ljava/lang/Object;
560
+
public static fun receiveOrNull (Lkotlinx/coroutines/channels/ActorScope;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
559
561
}
560
562
561
563
public abstract interface class kotlinx/coroutines/channels/BroadcastChannel : kotlinx/coroutines/channels/SendChannel {
@@ -600,8 +602,10 @@ public abstract interface class kotlinx/coroutines/channels/Channel : kotlinx/co
600
602
601
603
public final class kotlinx/coroutines/channels/Channel$DefaultImpls {
602
604
public static synthetic fun cancel (Lkotlinx/coroutines/channels/Channel;)V
605
+
public static fun getOnReceiveOrNull (Lkotlinx/coroutines/channels/Channel;)Lkotlinx/coroutines/selects/SelectClause1;
603
606
public static fun offer (Lkotlinx/coroutines/channels/Channel;Ljava/lang/Object;)Z
604
607
public static fun poll (Lkotlinx/coroutines/channels/Channel;)Ljava/lang/Object;
608
+
public static fun receiveOrNull (Lkotlinx/coroutines/channels/Channel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
605
609
}
606
610
607
611
public final class kotlinx/coroutines/channels/Channel$Factory {
@@ -627,6 +631,9 @@ public final class kotlinx/coroutines/channels/ChannelKt {
627
631
public static final fun Channel (ILkotlinx/coroutines/channels/BufferOverflow;Lkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/channels/Channel;
628
632
public static synthetic fun Channel$default (IILjava/lang/Object;)Lkotlinx/coroutines/channels/Channel;
629
633
public static synthetic fun Channel$default (ILkotlinx/coroutines/channels/BufferOverflow;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)Lkotlinx/coroutines/channels/Channel;
634
+
public static final fun getOrElse-WpGqRn0 (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
635
+
public static final fun onFailure-WpGqRn0 (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
636
+
public static final fun onSuccess-WpGqRn0 (Ljava/lang/Object;Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
630
637
}
631
638
632
639
public final class kotlinx/coroutines/channels/ChannelResult {
@@ -840,7 +847,9 @@ public final class kotlinx/coroutines/channels/ReceiveChannel$DefaultImpls {
840
847
public static synthetic fun cancel (Lkotlinx/coroutines/channels/ReceiveChannel;)V
841
848
public static synthetic fun cancel$default (Lkotlinx/coroutines/channels/ReceiveChannel;Ljava/lang/Throwable;ILjava/lang/Object;)Z
842
849
public static synthetic fun cancel$default (Lkotlinx/coroutines/channels/ReceiveChannel;Ljava/util/concurrent/CancellationException;ILjava/lang/Object;)V
850
+
public static fun getOnReceiveOrNull (Lkotlinx/coroutines/channels/ReceiveChannel;)Lkotlinx/coroutines/selects/SelectClause1;
843
851
public static fun poll (Lkotlinx/coroutines/channels/ReceiveChannel;)Ljava/lang/Object;
852
+
public static fun receiveOrNull (Lkotlinx/coroutines/channels/ReceiveChannel;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
844
853
}
845
854
846
855
public abstract interface class kotlinx/coroutines/channels/SendChannel {
0 commit comments