open class Resumable : AtomicReference<Continuation<Any>>
Primitive for suspending and resuming coroutines on demand
Resumable()
Primitive for suspending and resuming coroutines on demand |
suspend fun await(): Unit
Await the resumption of this Resumable, suspending the current coroutine if necessary. Only one thread can call this method. |
|
fun resume(): Unit
Resume this Resumable, resuming any currently suspended await callers. This method can be called by any number of threads. |