зеркало из https://github.com/mono/SkiaSharp.git
Use the correct way to get the main thread
This commit is contained in:
Родитель
91262e1d9f
Коммит
54ede1963b
|
@ -40,7 +40,8 @@ namespace SkiaSharpSample.Samples
|
|||
|
||||
cts = new CancellationTokenSource();
|
||||
|
||||
scheduler = TaskScheduler.Current;
|
||||
scheduler = TaskScheduler.FromCurrentSynchronizationContext();
|
||||
|
||||
var loop = Task.Run(async () =>
|
||||
{
|
||||
while (!cts.IsCancellationRequested)
|
||||
|
|
Загрузка…
Ссылка в новой задаче