Skip to content

Commit e18b015

Browse files
elizarovqwwdfsad
authored andcommitted
Fixed CoroutineScope of withContext block for structured concurrency
* Both withContext and coroutineScope are optimized and are rewritten as extensions of AbstractCoroutine * This gives withContext consistent exception handling & suppression logic from JobSupport * Support for cancelling state is dropped from AbstractContinuation and it is now faster, too (it can be merged with CancellableContinuationImpl in the future) Fixes #553 Fixes #617
1 parent 0a656ff commit e18b015

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

common/kotlinx-coroutines-core-common/src/CoroutineScope.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ import kotlin.coroutines.experimental.intrinsics.*
1616
*
1717
* Every coroutine builder (like [launch][CoroutineScope.launch], [async][CoroutineScope.async], etc)
1818
* and every scoping function (like [coroutineScope], [withContext], etc) provides _its own_ scope
19-
* into the inner block of code it runs. By convention, they all wait for all the coroutines inside
19+
* with its own [Job] instance into the inner block of code it runs.
20+
* By convention, they all wait for all the coroutines inside
2021
* their block to complete before completing themselves, thus enforcing the
2122
* discipline of **structured concurrency**.
2223
*

0 commit comments

Comments
 (0)