Last active
August 28, 2022 13:25
-
-
Save aleksandarzekovic/f486ec11c245fd46f9ed632c01042cc9 to your computer and use it in GitHub Desktop.
This file contains 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
// kotlin/libraries/stdlib/jvm/src/kotlin/coroutines/intrinsics/IntrinsicsJvm.kt | |
@SinceKotlin("1.3") | |
public actual fun <R, T> (suspend R.() -> T).createCoroutineUnintercepted( | |
receiver: R, | |
completion: Continuation<T> | |
): Continuation<Unit> { | |
val probeCompletion = probeCoroutineCreated(completion) | |
return if (this is BaseContinuationImpl) | |
create(receiver, probeCompletion) | |
else { | |
createCoroutineFromSuspendFunction(probeCompletion) { | |
(this as Function2<R, Continuation<T>, Any?>).invoke(receiver, it) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment