-
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
2.x: improve autoConnect() Javadoc + add its marble #5756
Conversation
* <p> | ||
* The connection happens after the first subscription and happens at most once | ||
* during the lifetime of the returned Flowable. If this ConnectableFlowable | ||
* terminates, the connection is never renewed, no matter how Subscribers come |
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.
maybe no matter how many Subscribers
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 don't feel "many" should be there.
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 liked it 👍
* <p> | ||
* This overload does not allow disconnecting the connection established via | ||
* {@link #connect(Consumer)}. Use the {@link #autoConnect(int, Consumer)} overload | ||
* to gain access to the {@code Disposable} representing the only connection. |
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.
nit: add @see refCount() and another overload
?
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.
Same below + in ConnectableObservable
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 omitted refCount
here because there is no refCount(int)
yet and that would confuse readers.
This PR improves the JavaDoc of
ConnectableObservable.autoConnect()
andConnectableFlowable.autoConnect()
operators and adds the respective marble diagrams: