startCoroutineUninterceptedOrReturn

Common
JVM
JS
Native
1.1
fun <T> (suspend () -> T).startCoroutineUninterceptedOrReturn(
    completion: Continuation<T>
): Any?

Starts unintercepted coroutine without receiver and with result type T and executes it until its first suspension. Returns the result of the coroutine or throws its exception if it does not suspend or COROUTINE_SUSPENDED if it suspends. In the latter case, the completion continuation is invoked when coroutine completes with result or exception. This function is designed to be used from inside of suspendCoroutineOrReturn to resume the execution of a suspended coroutine using a reference to the suspending function.

Common
JVM
JS
Native
1.1
fun <R, T> (suspend R.() -> T).startCoroutineUninterceptedOrReturn(
    receiver: R,
    completion: Continuation<T>
): Any?

Starts unintercepted coroutine with receiver type R and result type T and executes it until its first suspension. Returns the result of the coroutine or throws its exception if it does not suspend or COROUTINE_SUSPENDED if it suspends. In the latter case, the completion continuation is invoked when coroutine completes with result or exception. This function is designed to be used from inside of suspendCoroutineOrReturn to resume the execution of a suspended coroutine using a reference to the suspending function.