Skip to content

Commit ff5083b

Browse files
Update kotlinx-coroutines-core/jvm/src/CoroutineContext.kt
Co-authored-by: dkhalanskyjb <[email protected]>
1 parent f572e8b commit ff5083b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kotlinx-coroutines-core/jvm/src/CoroutineContext.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ private val hasCopyableElements: (Boolean, CoroutineContext.Element) -> Boolean
4545
* Folds two contexts properly applying [CopyableThreadContextElement] rules when necessary.
4646
* The rules are the following:
4747
* * If neither context has CTCE, the sum of two contexts is returned
48-
* * Every CTCE from left-hand side context that does not have matching (by key) element from right-hand side context
49-
* is [copied][CopyableThreadContextElement.copyForChild]
48+
* * Every CTCE from the left-hand side context that does not have a matching (by key) element from right-hand side context
49+
* is [copied][CopyableThreadContextElement.copyForChild] if [isNewCoroutine] is `true`.
5050
* * Every CTCE from left-hand side context that has matching element in right-hand side context is [merged][CopyableThreadContextElement.mergeForChild]
5151
* * Every CTCE from right-hand side context that hasn't been merged is copied
5252
* * Everything else is added to the resulting context as is.

0 commit comments

Comments
 (0)