Created
June 2, 2022 08:33
-
-
Save myungpyo/6364c3cb83619892cc8863809c5b02d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun cancelParent(cause: Throwable): Boolean { | |
if (isScopedCoroutine) return true | |
val isCancellation = cause is CancellationException | |
val parent = parentHandle | |
if (parent === null || parent === NonDisposableHandle) { | |
return isCancellation | |
} | |
return parent.childCancelled(cause) || isCancellation | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment