public static Dispatcher StartNew(CancellationToken token)
 {
     var dispatcher = new SingleThreadDispatcher();
     AvaloniaLocator.Current.GetService<IRuntimePlatform>().PostThreadPoolItem(() =>
     {
         dispatcher.MainLoop(token);
     });
     return dispatcher;
 }
Ejemplo n.º 2
0
        public static Dispatcher StartNew(CancellationToken token)
        {
            var dispatcher = new SingleThreadDispatcher();

            AvaloniaLocator.Current.GetService <IPclPlatformWrapper>().PostThreadPoolItem(() =>
            {
                dispatcher.MainLoop(token);
            });
            return(dispatcher);
        }