Signal

trait Signal[F[_], A]

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

Companion
object
class Object
trait Matchable
class Any
class SignallingRef[F, A]

Value members

Abstract methods

def continuous: Stream[F, A]

Returns a stream of the current value of the signal. An element is always available -- on each pull, the current value is supplied.

Returns a stream of the current value of the signal. An element is always available -- on each pull, the current value is supplied.

def discrete: Stream[F, A]

Returns a stream of the updates to this signal.

Returns a stream of the updates to this signal.

Updates that are very close together may result in only the last update appearing in the stream. If you want to be notified about every single update, use a Queue or Channel instead.

def get: F[A]

Asynchronously gets the current value of this Signal.

Asynchronously gets the current value of this Signal.

Concrete methods

def interrupt[A](s: Stream[F, A])(implicit F: Concurrent[F]): Stream[F, A]
Implicitly added by BooleanSignalOps

Interrupts the supplied Stream when this Signal is true.

Interrupts the supplied Stream when this Signal is true.

def map[B](f: A => B)(implicit F: Functor[F]): Signal[F, B]
Implicitly added by SignalOps

Converts this signal to signal of B by applying f.

Converts this signal to signal of B by applying f.

def predicate[A](f: F[A])(implicit F: Monad[F]): F[Unit]
Implicitly added by BooleanSignalOps

Predicates the supplied effect f on this Signal being true.

Predicates the supplied effect f on this Signal being true.

Concrete fields

val self: Signal[F, Boolean]
Implicitly added by BooleanSignalOps
val self: Signal[F, A]
Implicitly added by SignalOps