open class ResumableCollector<T> : Resumable
A collector that hosts a signal (value/error/completion) and allows waiting for the signal and a consumer to be ready to receive them.
ResumableCollector()
A collector that hosts a signal (value/error/completion) and allows waiting for the signal and a consumer to be ready to receive them. |
var error: Throwable? |
|
var value: T |
suspend fun complete(): Unit |
|
suspend fun drain(collector: FlowCollector<T>, onComplete: (ResumableCollector<T>) -> Unit = null): Unit |
|
suspend fun error(error: Throwable): Unit |
|
suspend fun next(value: T): Unit |
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. |