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

Operation GroupJoin #538

Closed
wants to merge 1 commit into from
Closed

Operation GroupJoin #538

wants to merge 1 commit into from

Conversation

akarnokd
Copy link
Member

Issue #53

Steps taken:

  • Started out from scratch based on the join() operator's pattern
  • Consulted with Rx.NET sources to match the data types of left&right maps; and behavior
  • Added RefCountSubscription class and consulted Rx.NET on the unsubscription behavior
  • Looked at WindowObservable and AddRef in the Rx.NET sources for their behavior.
  • Took a test inspiration from http://rxwiki.wikidot.com/101samples#toc39

@headinthebox While writing the test for the operator, I've noticed that when both duration selectors are never(), Rx.NET never calls onCompleted on the group subjects, even though the left and right sources onComplete(). I haven't seen Rx.NET test for this scenario. This comes into play when I want to emulate join() with groupJoin(): the outer merge never onCompletes(). If I understand the behavior corretly, when both left and right sources get depleted, there is no way a new group or new group value would arrive, and all the open groups and the main observer can be onCompleted(). This is somewhat similar to join() and groupByUntil() behavior.

@cloudbees-pull-request-builder

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

@headinthebox
Copy link
Contributor

Thanks man! Things are a bit slow due to Thanksgiving and Ben travelling but I'll try to have a look between the Turkey and the mashed potatoes..

@benjchristensen
Copy link
Member

This needs to be rebased as it conflicts with the master branch now.

@headinthebox Are you good with this?

@akarnokd
Copy link
Member Author

akarnokd commented Dec 4, 2013

Will do after GroupByUntil is merged so I don't have to rebase all the time. Btw, is there a way to add new methods to Observable so it won't conflict all the time? Should I add the new methods randomly in the middle, not at the end?

@benjchristensen
Copy link
Member

Typically when I'm adding operators I put them alphabetically inside Observable and the merge/diff behavior seems to handle that better than appending to the end of the file.

@akarnokd
Copy link
Member Author

akarnokd commented Dec 5, 2013

Will create new PR shortly.

@akarnokd akarnokd closed this Dec 5, 2013
@akarnokd akarnokd deleted the GroupJoin branch January 13, 2014 10:04
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
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.

4 participants