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

OperatorDebounce #1075

Closed
wants to merge 1 commit into from
Closed

Conversation

akarnokd
Copy link
Member

Operator Debounce

Issue #1060

Two notes:

  • The behavior of the timed debounce has changed. In the original, if an onCompleted event arrived after an onNext event, that last value was lost. This new version emits the last value if it can then completes. This is consistent with the selector-based debounce operator from before and now.
  • In both overloads, when the emission is run in parallel with the onCompleted of the main, the last event might or might not reach the client subscriber: one of the threads will grab the last value, but the call to the client.onCompleted might prevent the value delivery in the emission thread. This couldn't happen in the original as the event emissions where performed under the lock as well. We need to decide if we want to handle this corner case.

@akarnokd akarnokd mentioned this pull request Apr 23, 2014
57 tasks
@cloudbees-pull-request-builder

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

@benjchristensen
Copy link
Member

when the emission is run in parallel with the onCompleted of the main

It seems to me we should ensure delivery and thus let the onNext emit onCompleted after it's done if there's a race.

@akarnokd
Copy link
Member Author

Okay, I'll add the necessary queue-drain logic tomorrow to fix that case.

@akarnokd
Copy link
Member Author

Closing due to merge conflicts. Will post a new PR.

@akarnokd akarnokd closed this Apr 25, 2014
@akarnokd akarnokd mentioned this pull request Apr 25, 2014
@akarnokd akarnokd deleted the OperatorDebounce branch May 6, 2014 13:37
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