Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Implemented SerialSubscription and Timeout operator#434

Merged
benjchristensen merged 4 commits intoReactiveX:masterfrom
johnhmarks:Timeout
Oct 22, 2013
Merged

Implemented SerialSubscription and Timeout operator#434
benjchristensen merged 4 commits intoReactiveX:masterfrom
johnhmarks:Timeout

Conversation

@johnhmarks
Copy link
Contributor

Implemented Timeout operator and SerialSubscription upon which it is based.

@cloudbees-pull-request-builder

RxJava-pull-requests #345 SUCCESS
This pull request looks good

Copy link
Member

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?

https://github.com/Netflix/RxJava/blob/master/rxjava-core/src/main/java/rx/subscriptions/MultipleAssignmentSubscription.java

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.

Copy link
Contributor Author

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

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah okay, cool.

@benjchristensen
Copy link
Member

Merging this as it functions and is well written and well documented and will then look at whether modifications based on #446 make sense.

benjchristensen added a commit that referenced this pull request Oct 22, 2013
Implemented SerialSubscription and Timeout operator
@benjchristensen benjchristensen merged commit b5ec461 into ReactiveX:master Oct 22, 2013
rickbw pushed a commit to rickbw/RxJava that referenced this pull request Jan 9, 2014
Implemented SerialSubscription and Timeout operator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants