-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Implemented SerialSubscription and Timeout operator #434
Conversation
RxJava-pull-requests #345 SUCCESS |
* | ||
* @see <a href="http://msdn.microsoft.com/en-us/library/system.reactive.disposables.serialdisposable(v=vs.103).aspx">Rx.Net equivalent SerialDisposable</a> | ||
*/ | ||
public class SerialSubscription implements Subscription { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this class is achieving the same as MultipleAssingmentSubscription
. Can you take a look at it?
No idea why I wrote such a horrible Javadoc on it that doesn't explain it well. From the MSDN doc it states: "Represents a disposable whose underlying disposable can be swapped for another disposable."
Your Javadoc description should replace the MultipleAssingmentSubscription
one if I'm reading the code correctly and they do the same things.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ben,
SerialSubscription and MultipleAssignmentSubscription are different things. MultipleAssignment simply enables you to swap out the underlying subscription in a thread-safe manner. Whereas, Serial unsubscribes from the previous underlying as you replace.
See:
http://msdn.microsoft.com/en-us/library/system.reactive.disposables.serialdisposable(v=vs.103).aspx
Vs:
http://msdn.microsoft.com/en-us/library/system.reactive.disposables.multipleassignmentdisposable(v=vs.103).aspx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, cool.
Merging this as it functions and is well written and well documented and will then look at whether modifications based on #446 make sense. |
Implemented SerialSubscription and Timeout operator
Implemented SerialSubscription and Timeout operator
Implemented Timeout operator and SerialSubscription upon which it is based.