-
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
Javadoc : Explain explicitly about using Emitter interface methods synchronously #6305
Javadoc : Explain explicitly about using Emitter interface methods synchronously #6305
Conversation
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.
Thanks, could you rephrase all the sentences based on my suggestions in the comments?
@@ -17,6 +17,11 @@ | |||
/** | |||
* Base interface for emitting signals in a push-fashion in various generator-like source | |||
* operators (create, generate). | |||
* <p> | |||
* Note that the {@link Emitter#onNext}, {@link Emitter#onError} and | |||
* {@link Emitter#onComplete} methods provided to the function should be called synchronously, |
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.
"methods provided to the function via the {@link Emitter}
instance should be"
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.
Done.
@@ -2210,6 +2210,11 @@ public static int bufferSize() { | |||
|
|||
/** | |||
* Returns a cold, synchronous, stateless and backpressure-aware generator of values. | |||
* <p> | |||
* Note that the {@link Emitter#onNext}, {@link Emitter#onError} and | |||
* {@link Emitter#onComplete} methods provided to the function should be called synchronously, |
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.
"methods provided to the function via the {@link Emitter}
instance should be"
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.
Done.
* <p> | ||
* Note that the {@link Emitter#onNext}, {@link Emitter#onError} and | ||
* {@link Emitter#onComplete} methods provided to the function should be called synchronously, | ||
* never concurrently and only while the method is executing. Calling them from multiple threads |
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.
"while the function body is executing."
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.
Done.
Codecov Report
@@ Coverage Diff @@
## 2.x #6305 +/- ##
============================================
+ Coverage 98.25% 98.26% +<.01%
+ Complexity 6284 6283 -1
============================================
Files 672 672
Lines 44992 44992
Branches 6223 6223
============================================
+ Hits 44208 44211 +3
+ Misses 248 243 -5
- Partials 536 538 +2
Continue to review full report at Codecov.
|
aaeddd4
to
b971d56
Compare
Add note in Javadoc explicitly explaining about using Emitter interface methods synchronously.
generate
methods in Observable and Flowable.Resolves: #6299