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
Optimize CancellableContinuationImpl.invokeOnCancellation(..) for Segments (#3084)
* This optimization enables allocation-free channel operations, as we no longer have to allocate a cancellation handler for suspending channel operations
* Add a sequential semaphore benchmark and a generalized version of `ChannelSinkBenchmark` that supports buffered channels and pre-allocates elements to isolate the effect
Signed-off-by: Nikita Koval <[email protected]>
Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
Copy file name to clipboardExpand all lines: kotlinx-coroutines-core/api/kotlinx-coroutines-core.api
+3-1
Original file line number
Diff line number
Diff line change
@@ -51,7 +51,7 @@ public final class kotlinx/coroutines/CancellableContinuation$DefaultImpls {
51
51
public static synthetic fun tryResume$default (Lkotlinx/coroutines/CancellableContinuation;Ljava/lang/Object;Ljava/lang/Object;ILjava/lang/Object;)Ljava/lang/Object;
52
52
}
53
53
54
-
public class kotlinx/coroutines/CancellableContinuationImpl : kotlin/coroutines/jvm/internal/CoroutineStackFrame, kotlinx/coroutines/CancellableContinuation, kotlinx/coroutines/channels/Waiter {
54
+
public class kotlinx/coroutines/CancellableContinuationImpl : kotlin/coroutines/jvm/internal/CoroutineStackFrame, kotlinx/coroutines/CancellableContinuation, kotlinx/coroutines/Waiter {
55
55
public fun <init> (Lkotlin/coroutines/Continuation;I)V
56
56
public final fun callCancelHandler (Lkotlinx/coroutines/CancelHandler;Ljava/lang/Throwable;)V
57
57
public final fun callOnCancellation (Lkotlin/jvm/functions/Function1;Ljava/lang/Throwable;)V
@@ -64,6 +64,7 @@ public class kotlinx/coroutines/CancellableContinuationImpl : kotlin/coroutines/
64
64
public fun getStackTraceElement ()Ljava/lang/StackTraceElement;
65
65
public fun initCancellability ()V
66
66
public fun invokeOnCancellation (Lkotlin/jvm/functions/Function1;)V
67
+
public fun invokeOnCancellation (Lkotlinx/coroutines/internal/Segment;I)V
67
68
public fun isActive ()Z
68
69
public fun isCancelled ()Z
69
70
public fun isCompleted ()Z
@@ -1258,6 +1259,7 @@ public class kotlinx/coroutines/selects/SelectImplementation : kotlinx/coroutine
1258
1259
public fun invoke (Lkotlinx/coroutines/selects/SelectClause1;Lkotlin/jvm/functions/Function2;)V
1259
1260
public fun invoke (Lkotlinx/coroutines/selects/SelectClause2;Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)V
1260
1261
public fun invoke (Lkotlinx/coroutines/selects/SelectClause2;Lkotlin/jvm/functions/Function2;)V
1262
+
public fun invokeOnCancellation (Lkotlinx/coroutines/internal/Segment;I)V
1261
1263
public fun onTimeout (JLkotlin/jvm/functions/Function1;)V
1262
1264
public fun selectInRegistrationPhase (Ljava/lang/Object;)V
1263
1265
public fun trySelect (Ljava/lang/Object;Ljava/lang/Object;)Z
0 commit comments