-
Notifications
You must be signed in to change notification settings - Fork 8
multiWindow
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