Skip to content

Commit b81eb83

Browse files
committed
Fix bug where CanExecuteObservable can come back on the wrong thread
1 parent c92780a commit b81eb83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ReactiveUI.Xaml/ReactiveAsyncCommand.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void commonCtor(int maximumConcurrent, IScheduler scheduler, IObservable<bool> c
9292
this.Log().Fatal("Reference count dropped below zero");
9393
}
9494
return ret;
95-
}).Multicast(new BehaviorSubject<int>(0)).PermaRef();
95+
}).Multicast(new BehaviorSubject<int>(0)).PermaRef().ObserveOn(RxApp.DeferredScheduler);
9696

9797
bool startCE = (_canExecuteExplicitFunc != null ? _canExecuteExplicitFunc(null) : true);
9898

0 commit comments

Comments
 (0)