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.
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\n
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\n
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);});
});
◆ RXCPP_OPERATORS_RX_WINDOW_WITH_TIME_OR_COUNT_HPP
#define RXCPP_OPERATORS_RX_WINDOW_WITH_TIME_OR_COUNT_HPP |
auto timer(TimePointOrDuration when) -> typename std::enable_if< detail::defer_timer< TimePointOrDuration, identity_one_worker >::value, typename detail::defer_timer< TimePointOrDuration, identity_one_worker >::observable_type >::type
Definition: rx-timer.hpp:114
auto range(T first=0, T last=std::numeric_limits< T >::max(), std::ptrdiff_t step=1) -> observable< T, detail::range< T, identity_one_worker >>
Definition: rx-range.hpp:119