Closed tymtam2 closed 5 years ago
Are you just trying to avoid blocking on the UI thread until the host shuts down? You can start Start on the host instead of Run, then you can call Dispose in the dispose of the Windows.UI.Xaml.Application (or close, not sure which one exists).
Hi. We're closing this issue as no response or updates have been provided in a timely manner and we have been unable to reproduce it. If you have more details and are encountering this issue please add a new reply and re-open the issue.
We've stayed with
{
System.Threading.Thread.CurrentThread.IsBackground = true;
MyRun();
}).Start();
solution, but moved from OnLaunched
since OnLaunched
is called multiple times.
But why?
What is the correct way to run IHost in a headed UWP App on IoT Core to avoid issues with running code on the UI thread?
I have to have something working quickly so for now I went for Thread.Start.
Is this a correct way? Is there a better way?