Skip to content

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

Closed

Description

@akarnokd

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).

Activity

  1. added this to the 3.0 milestone on Oct 31, 2019
  2. JosemyDuarte commented on Nov 1, 2019

    @JosemyDuarte
    Contributor

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

  3. akarnokd commented on Nov 1, 2019

    @akarnokd
    MemberAuthor

    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.

  4. JosemyDuarte commented on Nov 2, 2019

    @JosemyDuarte
    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

  5. ArtyomBasharkevich commented on Nov 18, 2019

    @ArtyomBasharkevich

    @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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      ⌂ 换网址