Repository navigation
Conversation
There was a problem hiding this comment.
I'm sorry I didn't notice this issue earlier, but it cannot be fixed within Uno, but rather within the Gallery sample. As per the UWP docs and the UWP samples, the event handler should reschedule to Dispatcher thread if needed - https://github.com/microsoft/Windows-universal-samples/blob/ad9a0c4def222aaf044e51f8ee0939911cb58471/Samples/Accelerometer/cs/Scenario1_DataEvents.xaml.cs#L86 . The reason is that for high-throughput scenarios where you want to just process accelerometer events as they come, you definitely prefer to be on the background thread. This way the Dispatcher would get swamped with potentially hundreds of events and the app would start freezing. So I suggest closing this PR and instead adding the Dispatcher.RunAsync to the Gallery app's event handlers
There was a problem hiding this comment.
@MartinZikmund Would that apply to
uno/src/Uno.UWP/Devices/Sensors/SimpleOrientationSensor.cs
Lines 69 to 79 in 7e3668b
This code is already in main, should it be changed?
Yes indeed, that should be changed to match the other sensors - e.g. trigger on background thread and then the user has to apply |
|
As discussed, we need to make sure that the behavior matches WinUI here, so I close this PR for now |
GitHub Issue (If applicable): closes #10217
PR Type
What kind of change does this PR introduce?
What is the current behaviour?
Application crash when reading Accelerometer values on iOS
What is the new behavior?
PR Checklist
Please check if your PR fulfills the following requirements:
Screenshots Compare Test Runresults.Other information
Internal Issue (If applicable):