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: Add onDropped callbacks to operators #7458

Closed
6 tasks done
akarnokd opened this issue Aug 8, 2022 · 8 comments
Closed
6 tasks done

3.x: Add onDropped callbacks to operators #7458

akarnokd opened this issue Aug 8, 2022 · 8 comments

Comments

@akarnokd
Copy link
Member

akarnokd commented Aug 8, 2022

Add onDropped callback overloads to most operators that drop items that can't be recovered by other means.

  • throttleLatest PR #7457
  • throttleFirst PR #7482
  • throttleLast / sample PR #7488
  • throttleWithTimeout / debounce PR #7510
  • onBackpressureLatest (PR #7458)
  • onBackpressureBuffer (PR #7567)
    • 📓 The current overloads with Action are somewhat unhelpful, however, we'll have to add overloads in a way that avoids lambda ambiguity.
@akarnokd akarnokd added this to the 3.2 milestone Aug 8, 2022
@Desislav-Petrov
Copy link
Contributor

Hi - do you need any help with some of these?

@akarnokd
Copy link
Member Author

@Desislav-Petrov you can have a stab at them. I won't have the time for weeks although there is no rush either.

@Desislav-Petrov
Copy link
Contributor

Desislav-Petrov commented Oct 18, 2022

Thanks, starting this week and will follow your PR per method strategy - I've started with throttleFirst

@Desislav-Petrov
Copy link
Contributor

hi @akarnokd - i'm looking at throttleLast. From what I see, we should change the public void onNext(T t) method in the *SampleTimed class. More precisely, when we do the lazySet() we should check if a value exists there - if so we need to call the onDropped with this value as this is what we're dropping.
Does this make sense?

@akarnokd
Copy link
Member Author

@Desislav-Petrov
Copy link
Contributor

Thx - leave this with me, will do a PR shortly.

@Desislav-Petrov
Copy link
Contributor

taking a look at throttleWithTimeout / debounce next

@Desislav-Petrov
Copy link
Contributor

Looking at onBackpressureLatest next

akarnokd added a commit that referenced this issue May 23, 2023
* 3.x: Add onDropped callback to onBackpressureBuffer

Related #7458

* MBE is expected

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

No branches or pull requests

2 participants