-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] ReactiveCommand not trigger #2169
Comments
Hey @zy97 👋, Thank you for opening an issue. We will get back to you as soon as we can. Also, check out our Open Collective and consider contributing financially. https://opencollective.com/reactiveui
|
I can confirm this isn't working properly unless this is by design. See the attached project: Clicking randomize only works the first time even though we are observing the changes on the main thread scheduler (ToProperty). |
After more investigation the execution fails on these lines: With this error:
The simple fix would be to add |
My only concern would be platforms other than WPF which might not care about main thread schedulers. Seems a reasonable thing though off the top of my head. Want to do a change and see how the unit tests go? |
It breaks the tests. As an example the output of this test is 3 instead of 2. I'm going to do some digging. |
I was looking into this and I confirmed your findings (same issue with Android). But may I ask for an example use case where someone would want to specify the output scheduler as TaskPoolScheduler? It doesn't make the command execute on said scheduler; it just outputs the results on the scheduler. So it seems like the default RxApp. MainThreadScheduler would suit your needs since you mentioned you're observing on the main thread via ToProperty anyways. With that said though, your proposed fix of adding ObserveOn(RxApp.MainThreadScheduler) works and the unit tests now pass thanks to a recent fix. |
#2849 should have fixed this so closing |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Describe the bug
When using ReactiveCommand.CreateFromTask and specifying its outputSchedule as TaskpoolScheduler, it is normal at version 9.22.1, but later, there will be no reaction when triggered once
Steps To Reproduce
Expected behavior
Screenshots
Environment
Additional context
The text was updated successfully, but these errors were encountered: