Netflix/RxJava — pull request #538 by akarnokd (2013-11-27 22:41:45+00:00)
Title: Operation GroupJoin

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.