Class Throttle
Represents an operator that ignores elements from an observable sequence which are followed by another element before the specified duration elapses.
The Throttle operator provides a mechanism to control backpressure in reactive streams. Throttle emits an element from the source sequence only if that element is followed by a period of silence longer than DueTime. If new elements are received during this period, the previous element is dropped and the silent period timer is reset.
Warning
Any elements emitted by Throttle will necessarily be delayed by DueTime, since the only way to test that an element is followed by a period of silence is to wait out the period.
public class Throttle : Combinator
- Inheritance
-
Throttle
- Inherited Members
Properties
DueTime
Gets or sets the time interval that must elapse before a value is propagated.
public TimeSpan DueTime { get; set; }
Property Value
Methods
Process<TSource>(IObservable<TSource>)
Ignores elements from an observable sequence which are followed by another element before the specified duration elapses.
public override IObservable<TSource> Process<TSource>(IObservable<TSource> source)
Parameters
sourceIObservable<TSource>The source sequence to throttle.
Returns
- IObservable<TSource>
The throttled sequence.
Type Parameters
TSourceThe type of the elements in the
sourcesequence.