Open mattleibow opened 2 years ago
Working on getting this done. Found some interesting things that happen: resources are not shared - sort of expected tbh
Need to get the recommendations from the WinUI team. Repro here: https://github.com/mattleibow/WinUIMultiThreadResources
Moving this to a later thing because multi-window for multi-threads is no longer supported in 1.0.x as the main way is now on a single thread. This will get added, but not sure of dates exactly.
From the WinUI team:
multi-window only works for single thread, we still don’t support multiple windows on multiple threads. I think when we took out the block on multi-window we should have added a block for multi-threaded.
So as of right now, this is not a supported option and about the multi-threaded resources:
It’s something we need to design, I don’t think we can stick with the way Xaml behaves in UWP today.
This is directly related to work here: https://github.com/dotnet/maui/issues/5534
Description
Most of the sensors (but some others) are using an incorrect way of marshalling the events to the main thread. They pick the active window, but this is incorrect because if you have multiple windows and then try update another window, there is a marshalling error.
Steps to Reproduce
Start a new window in a new thread like this:
Version with bug
Preview 14 (current)
Last version that worked well
Unknown/Other
Affected platforms
Windows
Affected platform versions
All
Did you find any workaround?
No response
Relevant log output
No response