static void Blocking() { var observable = new MyBlockingRangeObservable(5, 8); var subscription1 = observable.Subscribe(new MyObserver <int>()); subscription1.Dispose(); Console.WriteLine(); var subscription2 = observable.Subscribe(new MyObserver <int>("Subscriber 2")); subscription2.Dispose(); }
static void DemoDisposeNeverCalledIfClientForgets() { var observable = new MyBlockingRangeObservable(5, 8); var subscription1 = observable.Subscribe(new MySlowObserver <int>()); }