I stumbled on an issue (https://github.com/HTBox/allReady/issues/1313) at GitHub where they discussed about taking the ConfigureAwait(false) out of the code, claiming that, in ASP.NET Core
the call to
ConfigureAwait(false)is redundant and does nothing
Best I could find here is a “side note” in an answer (from Stephen Cleary, https://stackoverflow.com/a/40220190/2805831) telling that
ASP.NET Core no longer has a "context"
So, is ConfigureAwait(false) really unnecessary in ASP.NET Core (even if using full .Net Framework)? Does it have any real gain in performance in some cases or difference in the result/semantic?
EDIT: Is it different in this aspect if I am hosting it as a console application or in IIS?
ConfigureAwait(false), as the library can be consumed by different applications (ASP.NET Core, WPF, UWP, Console etc.)ConfigureAwait(false), while relevant in ASP.NET classic, is by no means necessary. It's a tradeoff: it kinda mitigates some sync-over-async deadlocks (which are design flaws anyway--they don't exist unless someone does something dumb) and occasionally has a ~microsecond performance boost by not reloading context. At the cost of not being able to depend on context, and havingConfigureAwaitall through your code. stackoverflow.com/questions/28221508/…