arrow-fx-coroutines / arrow.fx.coroutines.stream.concurrent / Signal

Signal

interface Signal<A>

Pure holder of a single value of type A that can be read in the effect F.

Functions

continuous Returns a stream of the current value of the signal. An element is always available – on each pull, the current value is supplied.abstract fun continuous(): Stream<A>
discrete Returns a stream of the updates to this signal.abstract fun discrete(): Stream<A>
get Asynchronously gets the current value of this Signal.abstract suspend fun get(): A
map open fun <B> map(f: (A) -> B): Signal<B>

Companion Object Functions

constant fun <A> constant(a: A): Signal<A>

Extension Functions

interrupt fun <O> Signal<Boolean>.interrupt(stream: Stream<O>): Stream<O>

Inheritors

SignallingAtomic Pure holder of a single atomic value of type A that can be both read and updated. Composes Signal and Atomic together to make an signalling atomic value.class SignallingAtomic<A> : Atomic<A>, Signal<A>

Do you like Arrow?

Arrow Org
<