@@ -377,7 +377,7 @@ namespace System.Reactive.Concurrency
_nextDue = _period;
_runState = Running;
- Disposable.TrySetSingle(ref _task, _scheduler.Schedule(this, _nextDue, static (@this, a) => @this.Tick(a)));
+ Disposable.SetSingle(ref _task, _scheduler.Schedule(this, _nextDue, static (@this, a) => @this.Tick(a)));
return this;
}
@@ -136,7 +136,7 @@ namespace System.Reactive.Linq.ObservableImpl
if (_append)
{
var disposable = _scheduler.ScheduleAction(this, AppendValue);
- Disposable.TrySetSingle(ref _schedulerDisposable, disposable);
+ Disposable.SetSingle(ref _schedulerDisposable, disposable);
else
@@ -32,7 +32,7 @@ namespace System.Reactive.Linq.ObservableImpl
//
// [OK] Use of unsafe Subscribe: non-pretentious exact mirror with the dual GetEnumerator method.
- Disposable.TrySetSingle(ref _subscription, source.Subscribe/*Unsafe*/(this));
+ Disposable.SetSingle(ref _subscription, source.Subscribe/*Unsafe*/(this));
@@ -36,7 +36,7 @@ namespace System.Reactive.Linq.ObservableImpl
public void Run(SkipUntil<TSource, TOther> parent)
- Disposable.TrySetSingle(ref _otherDisposable, parent._other.Subscribe(new OtherObserver(this)));
+ Disposable.SetSingle(ref _otherDisposable, parent._other.Subscribe(new OtherObserver(this)));
Run(parent._source);