Broadcast[A: Any #share]¶
Broadcasts data to all subscribers.
Implements¶
- SubscriberManager[A] ref
Constructors¶
create¶
Create a Broadcast for a given ManagedPublisher.
Parameters¶
- pub: ManagedPublisher[A] tag
- qbound: U64 val = call
Returns¶
- Broadcast[A] ref^
Public Functions¶
min_request¶
Returns the lowest request count of all subscribers.
Returns¶
- U64 val
max_request¶
Returns the highest request count of all subscribers.
Returns¶
- U64 val
queue_bound¶
Returns the queue bound.
Returns¶
- U64 val
queue_size¶
Returns the current queue size.
Returns¶
- U64 val
subscriber_count¶
Returns the current subscriber count.
Returns¶
- U64 val
publish¶
Send data to all subscribers.
Parameters¶
- a: A
Returns¶
- None val
on_complete¶
A ManagedPublisher should call this when it has no more data to produce.
Returns¶
- None val
on_error¶
A ManagedPublisher should call this when its internal state has resulted in an error that should be propagated to all subscribers.
Parameters¶
- e: ReactiveError val
Returns¶
- None val
on_subscribe¶
A ManagedPublisher should call this when it receives Publisher.subscribe.
Parameters¶
- sub: Subscriber[A] tag
Returns¶
- None val
on_request¶
A ManagedPublisher should call this when it receives ManagedPublisher._on_request.
Parameters¶
- sub: Subscriber[A] tag
- n: U64 val
Returns¶
- None val
on_cancel¶
A ManagedPublisher should call this when it receives ManagedPublisher._on_cancel.
Parameters¶
- sub: Subscriber[A] tag
Returns¶
- None val