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
Fix exception aggregation to ensure atomic handling of exceptions
* Removed legacy onFinishing handler support from JobSupport.
- It is no longer needed, because handleJobException covers #208
* Fixed bugs that were masked by cancelling parent from onFinishing.
* Job.cancelChild(parent) is introduced as a dedicated method to
send cancellation signal from parent to child.
* Job.getCancellationException() now works in completing state, too,
and it is used to get exception when parent's completion cancels
children.
* Child never aggregates exception received from it parent.
* JobSupport.handleJobException() for launch/actor is split into:
- cancelParentWithException - can be invoked multiple times on race;
- handleJobException which - invoked exactly once.
* Exception materiazization is much lazier now, which should
significantly improve performance when cancelling large hierarchies.
* Other minor perf improvements in JobSupport code.
Copy file name to clipboardExpand all lines: binary-compatibility-validator/reference-public-api/kotlinx-coroutines-core.txt
+5
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,5 @@
1
1
public abstract class kotlinx/coroutines/experimental/AbstractCoroutine : kotlin/coroutines/experimental/Continuation, kotlinx/coroutines/experimental/CoroutineScope, kotlinx/coroutines/experimental/Job {
2
+
protected final field parentContext Lkotlin/coroutines/experimental/CoroutineContext;
2
3
public fun <init> (Lkotlin/coroutines/experimental/CoroutineContext;Z)V
3
4
public synthetic fun <init> (Lkotlin/coroutines/experimental/CoroutineContext;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
4
5
public final fun getContext ()Lkotlin/coroutines/experimental/CoroutineContext;
@@ -369,7 +370,9 @@ public abstract interface class kotlinx/coroutines/experimental/Job : kotlin/cor
369
370
public static final field Key Lkotlinx/coroutines/experimental/Job$Key;
370
371
public abstract fun attachChild (Lkotlinx/coroutines/experimental/Job;)Lkotlinx/coroutines/experimental/DisposableHandle;
371
372
public abstract fun cancel (Ljava/lang/Throwable;)Z
373
+
public abstract fun cancelChild (Lkotlinx/coroutines/experimental/Job;)V
372
374
public abstract synthetic fun cancelChildren (Ljava/lang/Throwable;)V
375
+
public abstract fun childFailed (Ljava/lang/Throwable;)Z
373
376
public abstract fun getCancellationException ()Ljava/util/concurrent/CancellationException;
374
377
public abstract fun getChildren ()Lkotlin/sequences/Sequence;
375
378
public abstract fun getCompletionException ()Ljava/lang/Throwable;
@@ -440,7 +443,9 @@ public final class kotlinx/coroutines/experimental/NonCancellable : kotlin/corou
440
443
public static final field INSTANCE Lkotlinx/coroutines/experimental/NonCancellable;
441
444
public fun attachChild (Lkotlinx/coroutines/experimental/Job;)Lkotlinx/coroutines/experimental/DisposableHandle;
442
445
public fun cancel (Ljava/lang/Throwable;)Z
446
+
public fun cancelChild (Lkotlinx/coroutines/experimental/Job;)V
443
447
public synthetic fun cancelChildren (Ljava/lang/Throwable;)V
448
+
public fun childFailed (Ljava/lang/Throwable;)Z
444
449
public fun getCancellationException ()Ljava/util/concurrent/CancellationException;
445
450
public fun getChildren ()Lkotlin/sequences/Sequence;
446
451
public fun getCompletionException ()Ljava/lang/Throwable;
0 commit comments