Repeat

See also

  • Official ReactiveX documentation: Repeat
classmethod Observable.repeat(value=None, repeat_count=None, scheduler=None)

Generates an observable sequence that repeats the given element the specified number of times, using the specified scheduler to send out observer messages.

1 - res = rx.Observable.repeat(42) 2 - res = rx.Observable.repeat(42, 4) 3 - res = rx.Observable.repeat(42, 4, Rx.Scheduler.timeout) 4 - res = rx.Observable.repeat(42, None, Rx.Scheduler.timeout)

Keyword arguments: value – Element to repeat. repeat_count – [Optional] Number of times to repeat the element. If not

specified, repeats indefinitely.
scheduler – Scheduler to run the producer loop on. If not specified,
defaults to ImmediateScheduler.

Returns an observable sequence that repeats the given element the specified number of times.

../../_images/repeat.png