Open Sebazzz opened 1 year ago
It does! Specifically, in Blazor Server when executing razor components (I should probably change that now).
Yup, I should have specifically mentioned Blazor Server. This SynchronizationContext implementation doesn't necessarily schedule the work on the same thread like the WPF, WinForms and legacy ASP.NET does. It is prone to the same blocking issues however, I think.
Avoid using Task.Result and Task.Wait:
https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/0c82fa823796c38d0436c0c08665c944ab12f91d/AsyncGuidance.md?plain=1#L232
ASP.NET Core Blazor does appear to use a synchronization context, being the RendererSynchronizationContext](https://source.dot.net/#Microsoft.AspNetCore.Components/Rendering/RendererSynchronizationContext.cs,11).