Describe the bug 🐞
AI-assisted draft (reviewed and verified before posting).
After the recent performance refactoring, Interaction.RegisterHandler appears to no longer execute handlers on the captured SynchronizationContext.
In my testing, a UI handler registered from a View resumes on a ThreadPool thread, causing UI operations to fail unless they are explicitly dispatched back to the UI thread.
This seems to be related to the addition of .ConfigureAwait(false) after YieldToCurrentContext(), but I'm not sure whether this change was intentional.
Step to reproduce
- Register an
Interaction handler from a View.
- Inside the handler, check
SynchronizationContext.Current (or access a UI-only API).
- Trigger the interaction.
The handler resumes on a ThreadPool thread instead of the captured UI context.
Reproduction repository
No response
Expected behavior
RegisterHandler should resume on the captured context after YieldToCurrentContext(), matching the behavior before the refactoring and allowing UI handlers to execute without additional dispatching.
Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
ReactiveUI Version
No response
Additional information ℹ️
No response
Describe the bug 🐞
After the recent performance refactoring,
Interaction.RegisterHandlerappears to no longer execute handlers on the capturedSynchronizationContext.In my testing, a UI handler registered from a View resumes on a ThreadPool thread, causing UI operations to fail unless they are explicitly dispatched back to the UI thread.
This seems to be related to the addition of
.ConfigureAwait(false)afterYieldToCurrentContext(), but I'm not sure whether this change was intentional.Step to reproduce
Interactionhandler from a View.SynchronizationContext.Current(or access a UI-only API).The handler resumes on a ThreadPool thread instead of the captured UI context.
Reproduction repository
No response
Expected behavior
RegisterHandlershould resume on the captured context afterYieldToCurrentContext(), matching the behavior before the refactoring and allowing UI handlers to execute without additional dispatching.Screenshots 🖼️
No response
IDE
No response
Operating system
No response
Version
No response
Device
No response
ReactiveUI Version
No response
Additional information ℹ️
No response