import rx.subject : SubjectObject; auto s1 = new SubjectObject!int; auto s2 = new SubjectObject!short; auto merged = s1.merge(s2); int count = 0; auto d = merged.doSubscribe((int n) { count++; }); assert(count == 0); s1.put(1); assert(count == 1); s2.put(2); assert(count == 2); d.dispose(); s1.put(10); assert(count == 2); s2.put(100); assert(count == 2);