From the docs for the TakeUntil operator (emphasis mine):
The TakeUntil subscribes and begins mirroring the source Observable. It also monitors a second Observable that you provide. If this second Observable emits an item or sends a termination notification, the Observable returned by TakeUntil stops mirroring the source Observable and terminates.
If this is true, then why does this block?:
Observable.Never<Unit>()
.TakeUntil(Observable.Empty<Unit>())
.Wait();
Empty()should send a termination notification right away, should it not? - lbergnehrTakeUntilshould see that the second sequence has terminated and thus return a terminated sequence and theWaitshouldn't block, but I don't see any reason for an exception. - juharrTakeUntil"Returns the values from the source observable sequence until the other observable sequence produces a value." without considering terminated observables. - Preston Guillot