-
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
GroupBy behaviour onCompleted #2320
Comments
Looks desirable behaviour to me. Could you give more details of a use case
|
The
If you want to ignore a Or just filter out all elements for that group before it goes through the If this wasn't the case then a stream could |
You can also read more about the "time gap" issue that the RxJava |
This is exactly what I wanted to understand, thank you for your help! |
Great, glad that helped. The |
While I understand the tradeoff, I disagree with it. I prefer groupBy() emitting observables that can be ignored and/or processed independently. Here's a simple function that I wrote: https://gist.github.com/mikea/6493bdccad356297d471 I'm sure it is full of holes from rx-devs perspective, but it works for me. |
I like this idea, any chance of either a new operator or a version of GroupBy that can handle this? @mikea Is your |
@mikea glad to hear it works for you but there are holes in what you've got there. Without looking at your logic in any detail for starters never hold a lock when emitting (synchronized methods/blocks). Backpressure support usually requires some complexity as well and doesn't appear to be present Use |
Hi everyone, I was trying out the following code:
As expected this outputs 2 tuples
(k, obs)
, but the stream is never completed.Is this behavior intended, in particular in the case in which the GroupedObservables created by the operator are ignored (i.e. not subscribed to)? If so, what is the reason?
Thank you!
The text was updated successfully, but these errors were encountered: