kotlin.coroutines.experimental.createCoroutine
createCoroutine
fun <R, T> (suspend R.() -> T).createCoroutine( receiver: R, completion: Continuation<T> ): Continuation<Unit>
Platform and version requirements: Kotlin 1.1
Creates a coroutine with receiver type R and result type T. This function creates a new, fresh instance of suspendable computation every time it is invoked.
To start executing the created coroutine, invoke resume(Unit)
on the returned Continuation instance. The 登录查看完整内容