Description
For more context see #2422. Basically, the issue is if I subclass DispatcherQueueSynchronizationContext to use a non-reentrant wait to avoid reentrancy issues in WindowsAppSDK, then the app hangs on exit. There is an easy workaround which is to revert to the standard wait on FrameworkShutdownStarting. However, it would be nice if this wasn't needed. I'm posting here now in case this reqires any .net runtime updates before v11 is released.
Steps To Reproduce
Use this code in app startup where CustomDispatcherQueueSynchronizationContext is given in #2422 (and remove the workaround when shutting down).
Application.Start((p) => {
var context = new CustomDispatcherQueueSynchronizationContext(DispatcherQueue.GetForCurrentThread());
SynchronizationContext.SetSynchronizationContext(context);
_ = new App();
});
Expected Behavior
No hang on exit
Version Info
Last tested on CsWinRT 2.2, WindowsAppSDK 2.0
Additional Context
No response
Description
For more context see #2422. Basically, the issue is if I subclass DispatcherQueueSynchronizationContext to use a non-reentrant wait to avoid reentrancy issues in WindowsAppSDK, then the app hangs on exit. There is an easy workaround which is to revert to the standard wait on FrameworkShutdownStarting. However, it would be nice if this wasn't needed. I'm posting here now in case this reqires any .net runtime updates before v11 is released.
Steps To Reproduce
Use this code in app startup where CustomDispatcherQueueSynchronizationContext is given in #2422 (and remove the workaround when shutting down).
Expected Behavior
No hang on exit
Version Info
Last tested on CsWinRT 2.2, WindowsAppSDK 2.0
Additional Context
No response