|
|
@ -46,7 +46,11 @@ namespace Avalonia.UnitTests |
|
|
Dispatcher.UIThread.UpdateServices(); |
|
|
Dispatcher.UIThread.UpdateServices(); |
|
|
return Disposable.Create(() => |
|
|
return Disposable.Create(() => |
|
|
{ |
|
|
{ |
|
|
Dispatcher.UIThread.RunJobs(); |
|
|
if (Dispatcher.UIThread.CheckAccess()) |
|
|
|
|
|
{ |
|
|
|
|
|
Dispatcher.UIThread.RunJobs(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
scope.Dispose(); |
|
|
scope.Dispose(); |
|
|
Dispatcher.UIThread.UpdateServices(); |
|
|
Dispatcher.UIThread.UpdateServices(); |
|
|
}); |
|
|
}); |
|
|
|