Sample
emit the most recent items emitted by an Observable within periodic time intervals
See Also
- Backpressure-related Operators
- Debounce
- Window
- Introduction to Rx: Sample
- RxMarbles:
sample
- 101 Rx Samples: Sample — Simple
Language-Specific Information
RxGroovy sample throttleFirst throttleLast
RxGroovy implements this operator as sample
and throttleLast
.
Note that if the source Observable has emitted no items since the last time it was sampled, the Observable that results from this operator will emit no item for that sampling period.
RxJava 1․x sample throttleFirst throttleLast
RxJava implements this operator as sample
and throttleLast
.
Note that if the source Observable has emitted no items since the last time it was sampled, the Observable that results from this operator will emit no item for that sampling period.
RxJS sample throttleFirst
RxJS implements this operator with two variants of sample
.
sample
and throttleFirst
operate by default on the timeout
Scheduler. They are found in each of the following distributions:
rx.all.js
rx.all.compat.js
-
rx.time.js
(requiresrx.js
orrx.compat.js
) rx.lite.js
rx.lite.compat.js
© ReactiveX contributors
Licensed under the Apache License 2.0.
http://reactivex.io/documentation/operators/sample.html