From 4d3e07e34a2cadad5b70e1c8873244bb602b02cd Mon Sep 17 00:00:00 2001 From: Vsevolod Tolstopyatov Date: Tue, 19 May 2020 11:40:02 +0300 Subject: [PATCH] Remove parent.start() from CancellableContinuationImpl.kt It seems to be the legacy from times when CC was a Job, in order to observe behaviour change, a specific example should be accurately made --- .../common/src/CancellableContinuationImpl.kt | 1 - 1 file changed, 1 deletion(-) diff --git a/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt b/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt index e25ebd3a37..166cb3b353 100644 --- a/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt +++ b/kotlinx-coroutines-core/common/src/CancellableContinuationImpl.kt @@ -114,7 +114,6 @@ internal open class CancellableContinuationImpl( if (checkCompleted()) return if (parentHandle !== null) return // fast path 2 -- was already initialized val parent = delegate.context[Job] ?: return // fast path 3 -- don't do anything without parent - parent.start() // make sure the parent is started val handle = parent.invokeOnCompletion( onCancelling = true, handler = ChildContinuation(parent, this).asHandler