multiWindow - richardszalay/raix GitHub Wiki
Emits values into concurrent βwindowsβ, the lifetime for which are controlled by input.
function multiWndow(windowOpenings : IObservable.<TOpen>,
windowClosingSelector : Function) : IObservable.<T>Where windowClosingSelector is: function(open : TOpen):IObservable.<*>
multiWindow works similarly to window, except that it suppots multiple windows to be active concurrently.
When a value is emitted from windowOpenings, a new window is opened and the value is passed to windowClosingSelector. The return value of windowClosingSelector will signify the end of the windowβs lifetime.
A new IObservable is emitted at the start of each window, and any values received from the source during the windowβs lifetime are emitted to that sequence. If multiple windows are open concurrently, then any values received from the source will be sent to all open windows.
The returned sequence completes when the source sequence completes
The returned sequence raises an error if the source sequence raises an error, if windowOpenings raises an error or if a βlifetimeβ sequence raises an error.
wo = windowOpenings
wcs = windowClosingSelector
xs βββββββoββoβββββo
| | |
wo ββoββoββΌβββΌββββββΌ/
| | | | ||
ys ββoββoββΌβββΌββββββΌ|
| | | | ||
βwcsββΌβββ/ ||
ββββΌβoββo/ ||
βwcsββΌββββββΌ|
ββoββoβββββo/IObservable.< IObservable.<T> >
Coming soon