Skip to content
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

3.x: update javadoc for observeOn to mention its eagerness #6697

Closed
akarnokd opened this issue Oct 31, 2019 · 4 comments · Fixed by #6700
Closed

3.x: update javadoc for observeOn to mention its eagerness #6697

akarnokd opened this issue Oct 31, 2019 · 4 comments · Fixed by #6700

Comments

@akarnokd
Copy link
Member

Flowable.observeOn and Observable.observeOn try to do as much event delivery as they can.
Add a section explaining this property to all these multi-valued observeOn overloads:

"This operator keeps emitting as many signals as it can on the given Scheduler's Worker thread, which may result in a longer than expected occupation of this thread. In other terms, it does not allow per-signal fairness in case the worker runs on a shared underlying thread. If such fairness and signal/work interleaving is preferred, use the delay operator with zero time instead."

Also link to the @see #delay(long,TimeUnit,Scheduler).

@JosemyDuarte
Copy link
Contributor

Hi! Do we only need to add the quoted message in both classes? I can do it if it is ok.

@akarnokd
Copy link
Member Author

akarnokd commented Nov 1, 2019

I can do it if it is ok.

Sure.

Do we only need to add the quoted message in both classes?

Single, Maybe and Completable can signal only one event and thus can't exhibit the property described.

@JosemyDuarte
Copy link
Contributor

Hi @akarnokd! Just one silly question:

When you say

Add a section explaining this property to all these multi-valued observeOn overloads

You mean all but observeOn(Scheduler scheduler), right?

In any case, I just created a PR with what I understood was required. Please, if there is something wrong let me know to fix it.

Thanks

@ArtyomBasharkevich
Copy link

ArtyomBasharkevich commented Nov 18, 2019

@akarnokd could you take a look at this?
dariuszseweryn/RxAndroidBle#628
You can just test my last example, your suggestion to use delay() did not help me solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants