|
|
@@ -24,7 +24,7 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
|
|
|
internal sealed class _ : IdentitySink<TSource>
|
|
|
{
|
|
|
- private IDisposable? _otherDisposable;
|
|
|
+ private SingleAssignmentDisposableValue _otherDisposable;
|
|
|
private bool _forward;
|
|
|
private int _halfSerializer;
|
|
|
private Exception? _error;
|
|
|
@@ -36,7 +36,7 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
|
|
|
public void Run(SkipUntil<TSource, TOther> parent)
|
|
|
{
|
|
|
- Disposable.SetSingle(ref _otherDisposable, parent._other.Subscribe(new OtherObserver(this)));
|
|
|
+ _otherDisposable.Disposable = parent._other.Subscribe(new OtherObserver(this));
|
|
|
Run(parent._source);
|
|
|
}
|
|
|
|
|
|
@@ -44,9 +44,9 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
{
|
|
|
if (disposing)
|
|
|
{
|
|
|
- if (!Disposable.GetIsDisposed(ref _otherDisposable))
|
|
|
+ if (!_otherDisposable.IsDisposed)
|
|
|
{
|
|
|
- Disposable.Dispose(ref _otherDisposable);
|
|
|
+ _otherDisposable.Dispose();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -94,9 +94,9 @@ namespace System.Reactive.Linq.ObservableImpl
|
|
|
|
|
|
public void Dispose()
|
|
|
{
|
|
|
- if (!Disposable.GetIsDisposed(ref _parent._otherDisposable))
|
|
|
+ if (!_parent._otherDisposable.IsDisposed)
|
|
|
{
|
|
|
- Disposable.Dispose(ref _parent._otherDisposable);
|
|
|
+ _parent._otherDisposable.Dispose();
|
|
|
}
|
|
|
}
|
|
|
|