package timing
Type Members
- class DebounceEventStream[A] extends EventStream[A] with SingleParentObservable[A, A] with InternalTryObserver[A]
This stream emits the last event emitted by
parent
, but only afterintervalMs
has elapsed sinceparent
emitted the previous event.This stream emits the last event emitted by
parent
, but only afterintervalMs
has elapsed sinceparent
emitted the previous event.Essentially, this stream emits the parent's last event, but only once the parent stops emitting events for
intervalMs
.See also ThrottleEventStream
- class DelayEventStream[A] extends EventStream[A] with SingleParentObservable[A, A] with InternalNextErrorObserver[A]
- class FutureEventStream[A] extends EventStream[A]
This stream emits a value that the future resolves with.
This stream emits a value that the future resolves with.
This stream will not emit any events to subscribers added after the future was resolved, except as provided by
emitIfFutureCompleted
. - class FutureSignal[A] extends StrictSignal[Option[A]]
This signal behaves a bit differently than other signals typically do: it keeps track of state regardless of whether it is started.
This signal behaves a bit differently than other signals typically do: it keeps track of state regardless of whether it is started. This is possible because this case requires no special memory management.
Note that being a StrictSignal, this exposes
now
andtryNow
methods, however if thefuture
was not yet completed when this signal was created, this signal's current value will be updated *asynchronously* after the future has completed. - class PeriodicEventStream[A] extends EventStream[A]
- class SyncDelayEventStream[A] extends EventStream[A] with SingleParentObservable[A, A] with InternalTryObserver[A] with SyncObservable[A]
- class ThrottleEventStream[A] extends EventStream[A] with SingleParentObservable[A, A] with InternalTryObserver[A]
ThrottleEventStream emits at most one event per
intervalMs
.ThrottleEventStream emits at most one event per
intervalMs
. - All events are emitted in a new transaction, after an async delay, even if the delay is zero ms - Any incoming event is scheduled to be emitted as soon as possible, but no sooner thanintervalMs
after the last event that was actually emitted by the throttled stream - When an event is scheduled to be emitted, any event that was previously scheduled is cancelled (that's the nature of throttling, you only get at most one event withinintervalMs
) - Errors are propagated in the same manner - Stopping the stream cancels scheduled events and makes it forget everything that happened before.See also See also DebounceEventStream