Return an observable that emits connected, non-overlapping buffers of items from the source observable that were emitted during a fixed duration of time or when the buffer 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 buffers of items from the source observable that were emitted during a fixed duration of time or when the buffer has reached maximum capacity (whichever occurs first), on the specified scheduler.
- Template Parameters
-
Duration | the type of the time interval. |
Coordination | the type of the scheduler (optional). |
- Parameters
-
period | the period of time each buffer collects items before it is emitted and replaced with a new buffer. |
count | the maximum size of each buffer before it is emitted and new buffer is created. |
coordination | the scheduler for the buffers (optional). |
- Returns
- Observable that emits connected, non-overlapping buffers of items from the source observable that were emitted during a fixed duration of time or when the buffer has reached maximum capacity (whichever occurs first).
- Sample Code\n
auto values = int1.
values.
[](std::vector<long> v){
printf("OnNext:");
std::for_each(v.begin(), v.end(), [](long a){
printf(" %ld", a);
});
printf("\n");
},
[](){printf("OnCompleted\n");});
OnNext: 1 2
OnNext: 3
OnNext:
OnNext: 1
OnCompleted
- Sample Code\n
auto values = int1.
values.
[](std::vector<long> v){
printf("OnNext:");
std::for_each(v.begin(), v.end(), [](long a){
printf(" %ld", a);
});
printf("\n");
},
[](){printf("OnCompleted\n");});
OnNext: 1 2
OnNext: 3
OnNext:
OnNext: 1
OnCompleted
◆ RXCPP_OPERATORS_RX_BUFFER_WITH_TIME_OR_COUNT_HPP
#define RXCPP_OPERATORS_RX_BUFFER_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