mono-reactive icon indicating copy to clipboard operation
mono-reactive copied to clipboard

Use SerialDisposable in Concat() implementation.

Open atsushieno opened this issue 12 years ago • 2 comments

Currently we use CompositeDisposable to handle disposables from IObservable.Subscribe() on each IObservable object. This is not effective and it should be possible to use SerialDisposable instead. However, somehow that class does not work.

It could be a bug in SerialDisposable, or wrong usage in Concat() implementation.

atsushieno avatar Jan 29 '12 11:01 atsushieno

The problem seems gone.

atsushieno avatar Feb 05 '12 07:02 atsushieno

Actually I had to revert this back. For some reason, it is likely that some concatenated IObservable's Subscribe() result is set to SerialDisposable.Disposable in unexpected order, so that the sequence is disposed before iterating to the next observable.

I have added a test case as HistoricalSchedulerTest.AdvanceByRaisesEvent2() that uncovered this implementation issue (though I cannot identify which part of the library code is problematic).

atsushieno avatar Feb 05 '12 14:02 atsushieno