AsyncSignal

class AsyncSignal<T>(onRegister: () -> Unit = {}) : BaseSignal<T, suspend (T) -> Unit>

Constructors

Link copied to clipboard
constructor(onRegister: () -> Unit = {})

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val onRegister: () -> Unit

Functions

Link copied to clipboard
fun add(handler: suspend (T) -> Unit): Closeable
Link copied to clipboard
fun clear()
Link copied to clipboard
suspend operator fun invoke(value: T)
operator fun invoke(handler: suspend (T) -> Unit): Closeable
Link copied to clipboard
suspend operator fun AsyncSignal<Unit>.invoke()
Link copied to clipboard
suspend fun listen(): ReceiveChannel<T>
Link copied to clipboard
fun <TI, TO> AsyncSignal<TI>.mapSignal(transform: (TI) -> TO): AsyncSignal<TO>
Link copied to clipboard
fun once(handler: suspend (T) -> Unit): Closeable
Link copied to clipboard
suspend fun <T> AsyncSignal<T>.waitOne(): T
Link copied to clipboard
open suspend override fun waitOneBase(): T