New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: repeatWhen operator #396
Comments
Does |
@smaspe could you maybe explain more about the context for which you need |
@thanegill no, because retryWhen requires the source to error. (but similar) @kzaher sure! It is used in a polling system. The control Observable is able to trigger a single repeat from the source Observable. The control Observable can then be bound to either a timed interval, a user action, ... |
@thanegill Actually transforming the Completed event into a specific Error event on the source Observable allows to use retryWhen. A bit of a hack, though. |
Hi @smaspe, I think we would need to refactor That will probably take some time since I'll need to find time for investigations and those refactorings, but I'll see what we can do here in the long run. |
@kzaher thanks for taking that into consideration! much appreciated! |
+1 to this feature request — I'm doing something very similar (polling system). |
I think that right now you can just do something like:
and then
|
I believe this is worthy of inclusion in the core library. |
I would like this as well! Would be super useful |
Me too! It would be awesome, but this is from 2016 so I don't think it will be done soon... :/ |
I'm closing this for now due to inactivity - If you have any more comments on this subject, feel free to comment or ping me directly and I'll re-open it :) Thanks ! |
Other implementations of Rx have the
repeatWhen
operator, which allows the repetition to be controlled by anotherObservable
. Very convenient.It is quite different from
repeat
in that a/ you can control the flow of repetitions and b/ you can interrupt it.The implementation would probably take from
repeat
but not entirely, as it requires to delay thescheduleRecursive
call until a new event was received from the controlObservable
, and also to resubscribe to the original source instead of re-emitting the same event.The text was updated successfully, but these errors were encountered: