import rx.subject : SubjectObject; auto sub = new SubjectObject!int; bool result = false; sub.any().doSubscribe((bool) { result = true; }); assert(result == false); sub.put(1); assert(result == true);
See Implementation