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
fold(false) { result, it -> result || it isCopyableThreadContextElement<*> }
117
+
118
+
/**
119
+
* Folds two contexts properly applying [CopyableThreadContextElement] rules when necessary.
120
+
* The rules are the following:
121
+
* - If neither context has CTCE, the sum of two contexts is returned
122
+
* - Every CTCE from the left-hand side context that does not have a matching (by key) element from right-hand side context
123
+
* is [copied][CopyableThreadContextElement.copyForChild] if [isNewCoroutine] is `true`.
124
+
* - Every CTCE from the left-hand side context that has a matching element in the right-hand side context is [merged][CopyableThreadContextElement.mergeForChild]
125
+
* - Every CTCE from the right-hand side context that hasn't been merged is copied
126
+
* - Everything else is added to the resulting context as is.
fold(false) { result, it -> result || it isCopyableThreadContextElement<*> }
37
-
38
-
/**
39
-
* Folds two contexts properly applying [CopyableThreadContextElement] rules when necessary.
40
-
* The rules are the following:
41
-
* - If neither context has CTCE, the sum of two contexts is returned
42
-
* - Every CTCE from the left-hand side context that does not have a matching (by key) element from right-hand side context
43
-
* is [copied][CopyableThreadContextElement.copyForChild] if [isNewCoroutine] is `true`.
44
-
* - Every CTCE from the left-hand side context that has a matching element in the right-hand side context is [merged][CopyableThreadContextElement.mergeForChild]
45
-
* - Every CTCE from the right-hand side context that hasn't been merged is copied
46
-
* - Everything else is added to the resulting context as is.
0 commit comments