Skip to content

dmariogatto/aspnet-synchronizationcontext

Repository files navigation

ASP.NET SynchronizationContext Example

Blog Post

ASP.NET Classic & Core Web API (running full framework)

Referencing a .NET 4.7.2 async library

Api Call Description Deadlock Classic? Deadlock Core?
api/values normal call
api/values/framework/async async/await
api/values/framework/sync?configAwait=false synchronous blocking
api/values/framework/sync?configAwait=true synchronous blocking ✔️

Referencing a .NET Standard async library

Api Call Description Deadlock Classic? Deadlock Core?
api/values normal call
api/values/standard/async async/await
api/values/standard/sync?configAwait=false synchronous blocking
api/values/standard/sync?configAwait=true synchronous blocking ✔️

Simply, ConfigureAwait(false) is not required in an ASP.NET Core application (regardless of whether it's running with the full framework or core). This is because the SynchronizationContext is not determined by the runtime!

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors