-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Operator: Interval #55
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
Comments
It seems like
|
Sure, as soon as Timer is implemented or schedulers can do periodic scheduling, the implementation of |
Is the |
Actually, I'm not sure whether |
I just tried it out in C#. This code:
produces this output:
So I think we should update the RxJava version to support multiple subscribers. |
Compare to Java. Code:
Output:
I think this will be used a lot for small examples and so it should be fixed soon. @benjchristensen could you please reopen this issue? |
What does Rx.NET do when you wait a bit before subscribing the second time? Will it do this?
Or will it still start at 0 with subscriber 2? |
I added a first test for that use case here: jmhofer@2fe6da7 It fails, as expected from your comment above. |
The Rx Design Guidelines (5.10) say:
So I guess it would be okay for the second subscriber to always start at 0 too when subscribing to the same observable later (and not using |
There are probably other operators that are affected by this, too, because multiple subscribers are currently normally not getting tested by the unit tests... |
Here's another example from C#:
outputs:
So each subscriber starts at 0. |
Great, thanks. This means that my PR above should fix this. |
Yes, every new subscriber should start the Observable from the beginning. I have tried to make sure that's the case everywhere but apparently missed this one. If an Observable does not want that behavior that is what the various |
Merged in #379 so closing again. |
http://msdn.microsoft.com/en-us/library/hh229027(v=vs.103).aspx
http://msdn.microsoft.com/en-us/library/hh228911(v=vs.103).aspx
The text was updated successfully, but these errors were encountered: