You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with dynamic views in a UI, I need the ability to fork an existing stream and wire it up to n subviews. n is not a fixed number and oscillates up and down at runtime.
Some of these views will be destroyed at runtime, while others will stay intact. So, the mechanism should handle dynamic creation and removal of forks.
In #172, @vqvu suggested a broadcast method that consumes a stream returns an object with the following interface:
new() - Creates a new viewer stream that sees values emitted by the parent. destroy() - Destroys the parent. No new viewers can be created after this.
The broadcast#new method returns a viewer which has shared back pressure like a fork, but
They can be created dynamically, after data has started flowing.
The source does not get destroyed even when there are no viewers.
If there are no viewers, the source will be paused.
It is up to the user of broadcast to destroy the source once they are done with it.
The text was updated successfully, but these errors were encountered:
Follow on from #172.
When working with dynamic views in a UI, I need the ability to fork an existing stream and wire it up to n subviews. n is not a fixed number and oscillates up and down at runtime.
Some of these views will be destroyed at runtime, while others will stay intact. So, the mechanism should handle dynamic creation and removal of forks.
In #172, @vqvu suggested a
broadcast
method that consumes a stream returns an object with the following interface:new()
- Creates a new viewer stream that sees values emitted by the parent.destroy()
- Destroys the parent. No new viewers can be created after this.The
broadcast#new
method returns aviewer
which has shared back pressure like a fork, butbroadcast
to destroy the source once they are done with it.The text was updated successfully, but these errors were encountered: