MCPcopy Create free account
hub / github.com/ReactiveX/RxGo / Repeat

Method Repeat

observable_operator.go:1731–1745  ·  view source on GitHub ↗

Repeat returns an Observable that repeats the sequence of items emitted by the source Observable at most count times, at a particular frequency. Cannot run in parallel.

(count int64, frequency Duration, opts ...Option)

Source from the content-addressed store, hash-verified

1729// at most count times, at a particular frequency.
1730// Cannot run in parallel.
1731func (o *ObservableImpl) Repeat(count int64, frequency Duration, opts ...Option) Observable {
1732 if count != Infinite {
1733 if count < 0 {
1734 return Thrown(IllegalInputError{error: "count must be positive"})
1735 }
1736 }
1737
1738 return observable(o.parent, o, func() operator {
1739 return &repeatOperator{
1740 count: count,
1741 frequency: frequency,
1742 seq: make([]Item, 0),
1743 }
1744 }, true, false, opts...)
1745}
1746
1747type repeatOperator struct {
1748 count int64

Callers

nothing calls this directly

Calls 2

ThrownFunction · 0.85
observableFunction · 0.85

Tested by

no test coverage detected