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
Copy file name to clipboardExpand all lines: binary-compatibility-validator/reference-public-api/kotlinx-coroutines-core.txt
+18-3
Original file line number
Diff line number
Diff line change
@@ -456,11 +456,12 @@ public final class kotlinx/coroutines/experimental/YieldKt {
456
456
}
457
457
458
458
public abstract class kotlinx/coroutines/experimental/channels/AbstractChannel : kotlinx/coroutines/experimental/channels/AbstractSendChannel, kotlinx/coroutines/experimental/channels/Channel {
459
-
public fun <init> ()V
459
+
public fun <init> (Lkotlinx/coroutines/experimental/Job;)V
460
460
public fun cancel (Ljava/lang/Throwable;)Z
461
461
protected fun cleanupSendQueueOnCancel ()V
462
462
protected final fun describeTryPoll ()Lkotlinx/coroutines/experimental/channels/AbstractChannel$TryPollDesc;
463
463
protected final fun getHasReceiveOrClosed ()Z
464
+
public final fun getJob ()Lkotlinx/coroutines/experimental/Job;
464
465
public final fun getOnReceive ()Lkotlinx/coroutines/experimental/selects/SelectClause1;
465
466
public final fun getOnReceiveOrNull ()Lkotlinx/coroutines/experimental/selects/SelectClause1;
466
467
protected abstract fun isBufferAlwaysEmpty ()Z
@@ -539,15 +540,18 @@ public abstract interface class kotlinx/coroutines/experimental/channels/ActorSc
539
540
}
540
541
541
542
public final class kotlinx/coroutines/experimental/channels/ArrayBroadcastChannel : kotlinx/coroutines/experimental/channels/AbstractSendChannel, kotlinx/coroutines/experimental/channels/BroadcastChannel {
542
-
public fun <init> (I)V
543
+
public fun <init> (ILkotlinx/coroutines/experimental/Job;)V
544
+
public synthetic fun <init> (ILkotlinx/coroutines/experimental/Job;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
543
545
public fun close (Ljava/lang/Throwable;)Z
544
546
public final fun getCapacity ()I
547
+
public fun getJob ()Lkotlinx/coroutines/experimental/Job;
545
548
public fun open ()Lkotlinx/coroutines/experimental/channels/SubscriptionReceiveChannel;
546
549
public fun openSubscription ()Lkotlinx/coroutines/experimental/channels/SubscriptionReceiveChannel;
547
550
}
548
551
549
552
public class kotlinx/coroutines/experimental/channels/ArrayChannel : kotlinx/coroutines/experimental/channels/AbstractChannel {
550
-
public fun <init> (I)V
553
+
public fun <init> (ILkotlinx/coroutines/experimental/Job;)V
554
+
public synthetic fun <init> (ILkotlinx/coroutines/experimental/Job;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
551
555
protected fun cleanupSendQueueOnCancel ()V
552
556
protected fun getBufferDebugString ()Ljava/lang/String;
553
557
public final fun getCapacity ()I
@@ -712,7 +716,10 @@ public final class kotlinx/coroutines/experimental/channels/ConflatedBroadcastCh
712
716
public static final field UNDEFINED Lkotlinx/coroutines/experimental/internal/Symbol;
713
717
public fun <init> ()V
714
718
public fun <init> (Ljava/lang/Object;)V
719
+
public fun <init> (Lkotlinx/coroutines/experimental/Job;)V
720
+
public synthetic fun <init> (Lkotlinx/coroutines/experimental/Job;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
715
721
public fun close (Ljava/lang/Throwable;)Z
722
+
public fun getJob ()Lkotlinx/coroutines/experimental/Job;
716
723
public fun getOnSend ()Lkotlinx/coroutines/experimental/selects/SelectClause2;
717
724
public final fun getValue ()Ljava/lang/Object;
718
725
public final fun getValueOrNull ()Ljava/lang/Object;
@@ -726,6 +733,8 @@ public final class kotlinx/coroutines/experimental/channels/ConflatedBroadcastCh
726
733
727
734
public class kotlinx/coroutines/experimental/channels/ConflatedChannel : kotlinx/coroutines/experimental/channels/AbstractChannel {
728
735
public fun <init> ()V
736
+
public fun <init> (Lkotlinx/coroutines/experimental/Job;)V
737
+
public synthetic fun <init> (Lkotlinx/coroutines/experimental/Job;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
729
738
protected final fun isBufferAlwaysEmpty ()Z
730
739
protected final fun isBufferAlwaysFull ()Z
731
740
protected final fun isBufferEmpty ()Z
@@ -737,6 +746,8 @@ public class kotlinx/coroutines/experimental/channels/ConflatedChannel : kotlinx
737
746
738
747
public class kotlinx/coroutines/experimental/channels/LinkedListChannel : kotlinx/coroutines/experimental/channels/AbstractChannel {
739
748
public fun <init> ()V
749
+
public fun <init> (Lkotlinx/coroutines/experimental/Job;)V
750
+
public synthetic fun <init> (Lkotlinx/coroutines/experimental/Job;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
740
751
protected final fun isBufferAlwaysEmpty ()Z
741
752
protected final fun isBufferAlwaysFull ()Z
742
753
protected final fun isBufferEmpty ()Z
@@ -775,6 +786,7 @@ public abstract interface class kotlinx/coroutines/experimental/channels/Produce
775
786
776
787
public abstract interface class kotlinx/coroutines/experimental/channels/ReceiveChannel {
777
788
public abstract fun cancel (Ljava/lang/Throwable;)Z
789
+
public abstract fun getJob ()Lkotlinx/coroutines/experimental/Job;
778
790
public abstract fun getOnReceive ()Lkotlinx/coroutines/experimental/selects/SelectClause1;
779
791
public abstract fun getOnReceiveOrNull ()Lkotlinx/coroutines/experimental/selects/SelectClause1;
780
792
public abstract fun isClosedForReceive ()Z
@@ -797,6 +809,8 @@ public abstract interface class kotlinx/coroutines/experimental/channels/Receive
797
809
798
810
public class kotlinx/coroutines/experimental/channels/RendezvousChannel : kotlinx/coroutines/experimental/channels/AbstractChannel {
799
811
public fun <init> ()V
812
+
public fun <init> (Lkotlinx/coroutines/experimental/Job;)V
813
+
public synthetic fun <init> (Lkotlinx/coroutines/experimental/Job;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
800
814
protected final fun isBufferAlwaysEmpty ()Z
801
815
protected final fun isBufferAlwaysFull ()Z
802
816
protected final fun isBufferEmpty ()Z
@@ -812,6 +826,7 @@ public abstract interface class kotlinx/coroutines/experimental/channels/Send {
812
826
813
827
public abstract interface class kotlinx/coroutines/experimental/channels/SendChannel {
814
828
public abstract fun close (Ljava/lang/Throwable;)Z
829
+
public abstract fun getJob ()Lkotlinx/coroutines/experimental/Job;
815
830
public abstract fun getOnSend ()Lkotlinx/coroutines/experimental/selects/SelectClause2;
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/AbstractChannel.kt
+24-1
Original file line number
Diff line number
Diff line change
@@ -259,6 +259,8 @@ public abstract class AbstractSendChannel<E> : SendChannel<E> {
259
259
helpClose(closed)
260
260
onClosed(closed)
261
261
afterClose(cause)
262
+
// Cancel it as the last action so if the channel is closed, then the job is cancelled as well
263
+
job.cancel(cause)
262
264
returntrue
263
265
}
264
266
@@ -473,9 +475,13 @@ public abstract class AbstractSendChannel<E> : SendChannel<E> {
473
475
/**
474
476
* Abstract send/receive channel. It is a base class for all channel implementations.
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/ArrayBroadcastChannel.kt
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/ArrayChannel.kt
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/ConflatedBroadcastChannel.kt
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/ConflatedChannel.kt
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/LinkedListChannel.kt
Copy file name to clipboardExpand all lines: common/kotlinx-coroutines-core-common/src/main/kotlin/kotlinx/coroutines/experimental/channels/RendezvousChannel.kt
+3-1
Original file line number
Diff line number
Diff line change
@@ -16,6 +16,8 @@
16
16
17
17
packagekotlinx.coroutines.experimental.channels
18
18
19
+
importkotlinx.coroutines.experimental.*
20
+
19
21
/**
20
22
* Rendezvous channel. This channel does not have any buffer at all. An element is transferred from sender
21
23
* to receiver only when [send] and [receive] invocations meet in time (rendezvous), so [send] suspends
0 commit comments