ReactiveUI 6 Async Command Not Running on Background Thread in WPF app

后端 未结 2 1578
刺人心
刺人心 2021-01-13 21:51

ViewModel

public class MyViewModel:ReactiveObject, IRoutableViewModel{
        private ReactiveList _appExtensions; 

        p         


        
2条回答
  •  感动是毒
    2021-01-13 22:46

    Change

     GetApplicationExtensions
                .ObserveOn(RxApp.MainThreadScheduler)
                .SubscribeOn(RxApp.TaskpoolScheduler)
    

    to

     GetApplicationExtensions
                .SubscribeOn(RxApp.TaskpoolScheduler)
                .ObserveOn(RxApp.MainThreadScheduler)
    

    ObserveOn should be after SubscribeOn

提交回复
热议问题