Return an observable that emits connected, non-overlapping windows of items from the source observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first), on the specified scheduler.
More...
Go to the source code of this file.
|
template<class... AN> |
auto | rxcpp::operators::window_with_time_or_count (AN &&...an) -> operator_factory< window_with_time_or_count_tag, AN... > |
| Return an observable that emits connected, non-overlapping windows of items from the source observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first), on the specified scheduler. More...
|
|
Return an observable that emits connected, non-overlapping windows of items from the source observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first), on the specified scheduler.
- Template Parameters
-
Duration | the type of time intervals. |
Coordination | the type of the scheduler (optional). |
- Parameters
-
period | the period of time each window collects items before it is completed and replaced with a new window. |
count | the maximum size of each window before it is completed and new window is created. |
coordination | the scheduler for the windows (optional). |
- Returns
- Observable that emits connected, non-overlapping windows of items from the source observable that were emitted during a fixed duration of time or when the window has reached maximum capacity (whichever occurs first).
- Sample Code
int counter = 0;
auto values = int1.
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;
auto values = int1.
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_WITH_TIME_OR_COUNT_HPP |