Return observable that emits the items emitted by the observable most recently emitted by the source observable.
More...
Return observable that emits the items emitted by the observable most recently emitted by the source observable.
- Template Parameters
-
Coordination | the type of the scheduler (optional). |
- Parameters
-
cn | the scheduler to synchronize sources from different contexts (optional). |
- Returns
- Observable that emits the items emitted by the observable most recently emitted by the source observable.
- Sample Code
});
auto values = base.switch_on_next().take(10);
values.
[](long v){printf("OnNext: %ld\n", v);},
[](){printf("OnCompleted\n");});
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 1
OnNext: 2
OnNext: 3
OnNext: 4
OnCompleted