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)
| 1729 | // at most count times, at a particular frequency. |
| 1730 | // Cannot run in parallel. |
| 1731 | func (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 | |
| 1747 | type repeatOperator struct { |
| 1748 | count int64 |
nothing calls this directly
no test coverage detected