trait Signal[A] extends immutable.Signal[A]
A signal whose value may be set asynchronously. Provides continuous and discrete streams for responding to changes to this value.
- Source
- Signal.scala
- Alphabetic
- By Inheritance
- Signal
- Signal
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
changed: Process[Task, Boolean]
Returns a continuous stream, indicating whether the value has changed.
Returns a continuous stream, indicating whether the value has changed. This will spike
trueonce for each time the value ofSignalwas changed. It will always start withtruewhen the process is run or when theSignalis set for the first time.- Definition Classes
- Signal
-
abstract
def
changes: Process[Task, Unit]
Returns the discrete version of
changed.Returns the discrete version of
changed. Will emitUnitwhen thevalueis changed.- Definition Classes
- Signal
-
abstract
def
compareAndSet(f: (Option[A]) ⇒ Option[A]): Task[Option[A]]
Asynchronously sets the current value of this
Signaland returns new value os thisSignal.Asynchronously sets the current value of this
Signaland returns new value os thisSignal. If thisSignalhas not been set yet, the Task will return None and value is set. If thisSignalisfinishedTask will fail withEndexception. If thisSignalisfailedTask will fail withSignalfailure exception.Furthermore if
fresults in evaluating to None, this Task is no-op and will return current value of theSignal. -
abstract
def
continuous: Process[Task, A]
Returns the continuous version of this signal, always equal to the current
Ainsidevalue.Returns the continuous version of this signal, always equal to the current
Ainsidevalue. Note that this may not see all changes ofAas it gets always current freshAat every request.- Definition Classes
- Signal
-
abstract
def
discrete: Process[Task, A]
Returns the discrete version of this signal, updated only when
valueis changed.Returns the discrete version of this signal, updated only when
valueis changed. Value may change several times between reads, but it is guaranteed this will always get latest known value after any change. If you want to be notified about every single change useasync.queuefor signalling.It will emit the current value of the Signal after being run or when the signal is set for the first time
- Definition Classes
- Signal
-
abstract
def
get: Task[A]
Asynchronously get the current value of this
Signal -
abstract
def
getAndSet(a: A): Task[Option[A]]
Asynchronously sets the current value of this
Signaland returns previous value of theSignal.Asynchronously sets the current value of this
Signaland returns previous value of theSignal. If thisSignalhas not been set yet, the Task will return None and value is set. If thisSignalisfinishedTask will fail withEndexception. If thisSignalisfailedTask will fail withSignalfailure exception. -
abstract
def
set(a: A): Task[Unit]
Sets the value of this
Signal. -
abstract
def
sink: Sink[Task, Msg[A]]
Returns sink that can be used to set this signal
Concrete Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Signal[A], B)
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
close: Task[Unit]
Indicate that the value is no longer valid.
Indicate that the value is no longer valid. Any attempts to
setorgetthisSignalafter aclosewill fail withTerminated(End)exception. ThisSignalisfinishedfrom now on.Running this task once the
Signalisfailedorfinishedis no-op and this task will not fail. - def ensuring(cond: (Signal[A]) ⇒ Boolean, msg: ⇒ Any): Signal[A]
- def ensuring(cond: (Signal[A]) ⇒ Boolean): Signal[A]
- def ensuring(cond: Boolean, msg: ⇒ Any): Signal[A]
- def ensuring(cond: Boolean): Signal[A]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
fail(error: Throwable): Task[Unit]
Raise an asynchronous error for readers of this
Signal.Raise an asynchronous error for readers of this
Signal. Any attempts tosetorgetthisRefafter thefailwill result in task failing withTerminated(Error(errr)). ThisSignalisfailedfrom now on.Running this task once the
Signalisfailedorfinishedis no-op and this task will not fail. -
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
- def formatted(fmtstr: String): String
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
def
kill: Task[Unit]
Indicate that the value is no longer valid.
Indicate that the value is no longer valid. Any attempts to
setorgetthisSignalafter aclosewill fail withTerminated(Kill)exception. ThisSignalisfinishedfrom now on.Running this task once the
Signalisfailedorfinishedis no-op and this task will not fail. -
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
refresh: Task[Unit]
Asynchronously refreshes the value of the signal, keep the value of this
Signalthe same, but notify any listeners.Asynchronously refreshes the value of the signal, keep the value of this
Signalthe same, but notify any listeners. If theSignalis not yet set, this is no-op -
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- def →[B](y: B): (Signal[A], B)