Rx observable waits for each subscribe to process in single threaded fashion. So Blocking happens var obs = System.Reactive.Linq.Observable.Range(0, 200, System.Reactive.Concurrency.Scheduler.TaskPool).Publish(); obs.Timestamp().Select(i => i). Subscribe(i => { Console.WriteLine("sub1 block " + i); Thread.Sleep(3000); }); obs.Timestamp().Select(i => i). Subscribe(i => { Console.WriteLine("sub2 " + i); }); obs.Connect(); Console.ReadLine();
Blog Archive
Monday, September 2, 2013
Subscriber block Observable
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment