Browse Source

Reduce the priority in AvaloniaSynchronizationContext.

`AvaloniaSynchronizationContext` was previously queuing continuations with `Send` priority, which is the maximum. This was causing the problem described in https://github.com/AvaloniaUI/Avalonia/issues/6930#issuecomment-1008888711. Decrease the priority so that continuations don't get called during `Window` construction on macOS.
pull/7343/head
Steven Kirk 5 years ago
parent
commit
2ae07d3277
  1. 2
      src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs

2
src/Avalonia.Base/Threading/AvaloniaSynchronizationContext.cs

@ -30,7 +30,7 @@ namespace Avalonia.Threading
/// <inheritdoc/>
public override void Post(SendOrPostCallback d, object? state)
{
Dispatcher.UIThread.Post(() => d(state), DispatcherPriority.Send);
Dispatcher.UIThread.Post(() => d(state), DispatcherPriority.Background);
}
/// <inheritdoc/>

Loading…
Cancel
Save