* Persistent context for the coroutine. It is an indexed set of [Element] instances. * An indexed set is a mix between a set and a map. * Every element in this set has a unique [Key]. */ @SinceKotlin("1.3") public interface CoroutineContext { https://cs.android.com/android/platform/superproject/main/+/main:external/kotlinx.coroutines/kotlinx-coroutines-core/js/src/Coro utineContext.kt
fun plus(context: CoroutineContext): CoroutineContext = if (context === EmptyCoroutineContext) this else // コメント省略 context.fold(this) { acc, element -> val removed = acc.minusKey(element.key) if (removed === EmptyCoroutineContext) element else { // 以下省略 } } https://cs.android.com/android/platform/superproject/main/+/main:external/kotlinx.coroutines/kotlinx-coroutines-core/js/src/Coro utineContext.kt
Finishing, proposedUpdate: Any?): Any? { // 途中省略 // Now handle the final exception if (finalException != null) { val handled = cancelParent(finalException) || handleJobException(finalException) if (handled) (finalState as CompletedExceptionally).makeHandled() } // 以下省略 https://cs.android.com/android/platform/superproject/main/+/main:external/kotlinx.coroutines/kotlinx-coroutines-core/common/src /JobSupport.kt
Finishing, proposedUpdate: Any?): Any? { // 途中省略 // Now handle the final exception if (finalException != null) { val handled = cancelParent(finalException) || handleJobException(finalException) if (handled) (finalState as CompletedExceptionally).makeHandled() } // 以下省略 https://cs.android.com/android/platform/superproject/main/+/main:external/kotlinx.coroutines/kotlinx-coroutines-core/common/src /JobSupport.kt