kotlin.coroutines.experimental.suspendCoroutine
suspendCoroutine
inline suspend fun <T> suspendCoroutine( crossinline block: (Continuation<T>) -> Unit ): T
Platform and version requirements: Kotlin 1.1
Obtains the current continuation instance inside suspend functions and suspends currently running coroutine.
In this function both Continuation.resume and Continuation.resumeWithException can be used either synchronous