Signal

class Signal<T>(onRegister: () -> Unit = {}) : BaseSignal<T, (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: (T) -> Unit): Closeable
Link copied to clipboard
fun Signal<Unit>.addCallInit(handler: (Unit) -> Unit): Closeable
fun <T> Signal<T>.addCallInit(initial: T, handler: (T) -> Unit): Closeable
Link copied to clipboard
suspend fun <T> Signal<T>.addSuspend(handler: suspend (T) -> Unit): Closeable
fun <T> Signal<T>.addSuspend(context: CoroutineContext, handler: suspend (T) -> Unit): Closeable
Link copied to clipboard
fun clear()
Link copied to clipboard
inline suspend fun <T> Signal<T>.executeAndWaitSignal(callback: () -> Unit): T
Link copied to clipboard
operator fun invoke(value: T)
operator fun invoke(handler: (T) -> Unit): Closeable
Link copied to clipboard
operator fun Signal<Unit>.invoke()
Link copied to clipboard
suspend fun listen(): ReceiveChannel<T>
Link copied to clipboard
fun <TI, TO> Signal<TI>.mapSignal(transform: (TI) -> TO): Signal<TO>
Link copied to clipboard
fun once(handler: (T) -> Unit): Closeable
Link copied to clipboard
suspend fun <T> Signal<T>.waitOne(): T
suspend fun <T> Signal<T>.waitOne(timeout: TimeSpan): T?
Link copied to clipboard
fun <T> Signal<T>.waitOneAsync(): Deferred<T>
Link copied to clipboard
open suspend override fun waitOneBase(): T
Link copied to clipboard
suspend fun <T> Signal<T>.waitOneOpt(timeout: TimeSpan?): T?