Event source that emits events when react
, except
or unreact
is called.
Event source that emits events when react
, except
or unreact
is called.
Emitter is simultaneously an event stream, and an observer.
An event stream that emits events when the underlying mutable object is modified.
An event stream that emits events when the underlying mutable object is modified.
An event with underlying mutable value is emitted whenever the mutable value was potentially mutated. This type of a signal provides a controlled way of manipulating mutable values.
Note:
The underlying mutable object must never be mutated directly by accessing
the value of the signal and changing the mutable object. Instead, the mutate
operation of Events
should be used to mutate the underlying mutable object.
Example:
val systemMessages = new Events.Emitter[String] val log = new Events.Mutable(new mutable.ArrayBuffer[String]) val logMutations = systemMessages.mutate(log) { buffer => msg => buffer += msg } systemMessages.react("New message arrived!") // buffer now contains the message
As long as there are no feedback loops in the dataflow graph,
the same thread will never modify the mutable object at the same time.
See the mutate
method on Events
s for more information.
Note that mutable event stream never unreacts.
the type of the underlying mutable object
scala.reactive.Events
A class for event streams that never emit events.
A class for event streams that never emit events.
type of events never emitted by this event stream
The default implementation of a event stream value.
The default implementation of a event stream value.
Keeps an optimized weak collection of weak references to subscribers. References to subscribers that are no longer reachable in the application will be removed eventually.
type of the events in this event stream value
Factory method for creating mux
event streams.
Factory method for creating mux
event streams.
See mux
on Events
for more details.
Returns an event stream that never emits.
Factory method for creating union
event streams.
Factory method for creating union
event streams.
See union
on Events
for more details.
Contains useful
Events
implementations and factory methods.