Return an observable that emits observables every period time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler.
More...
Go to the source code of this file.
|
template<class... AN> |
auto | rxcpp::operators::window_toggle (AN &&...an) -> operator_factory< window_toggle_tag, AN... > |
| Return an observable that emits observables every period time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler. More...
|
|
Return an observable that emits observables every period time interval and collects items from this observable for period of time into each produced observable, on the specified scheduler.
- Template Parameters
-
Openings | observable<OT> |
ClosingSelector | a function of type observable<CT>(OT) |
Coordination | the type of the scheduler (optional). |
- Parameters
-
opens | each value from this observable opens a new window. |
closes | this function is called for each opened window and returns an observable. the first value from the returned observable will close the window. |
coordination | the scheduler for the windows (optional). |
- Returns
- Observable that emits an observable for each opened window.
- Sample Code
int counter = 0;
[](long){
},
values.
int id = counter++;
printf("[window %d] Create window\n", id);
[id](long v){printf("[window %d] OnNext: %ld\n", id, v);},
[id](){printf("[window %d] OnCompleted\n", id);});
});
- Sample Code
int counter = 0;
[](long){
});
values.
int id = counter++;
printf("[window %d] Create window\n", id);
[id](long v){printf("[window %d] OnNext: %ld\n", id, v);},
[id](){printf("[window %d] OnCompleted\n", id);});
});
#define RXCPP_OPERATORS_RX_WINDOW_TOGGLE_HPP |