BoundedStreamBridge<T> class
final
A lazy, terminal-on-error bridge with one explicitly bounded queue.
Single-subscription sources receive demand. Broadcast sources keep running into this queue rather than an unbounded paused subscription. Event weight is supplied by the caller; this class performs no serialization.
Constructors
-
BoundedStreamBridge({required Stream<
T> source(), required int weigh(T), required StreamBufferLimits limits, StreamBridgeStats? stats, bool pauseSource = true, bool deferStart = true, void onStart()?, Object overflowError()?, Object sourceError(Object, StackTrace)?, Object elementError(Object, StackTrace)?, void onClosed(int, int, Object?)?}) -
Starts
sourceon first listen, by default on the next microtask.
Properties
Methods
-
close(
) → void - Ends normally, releasing queued data and the source immediately.
-
fail(
Object error, [StackTrace? stack]) → void - Ends with a terminal failure, dropping queued data immediately.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited