4 ms·
>> var myValue = DoSomethingAsync().ConfigureAwait(false).Result; Doing this inside ASP.NET request processing code (e.g. a controller method) will result in t
by myk9001 5y ago
>> var myValue = DoSomethingAsync().ConfigureAwait(false).Result;
Doing this inside ASP.NET request processing code (e.g. a controller method) will result in thread pool starvation [1], if you see about 50-100 (the numbers are off the top of my head, so check for yourself) requests per minute hitting that line of code.
P.S.: Sorry for a medium link, but couldn't really find an alternative.
[1]: https://medium.com/criteo-engineering/net-threadpool-starvation-and-how-queuing-makes-it-worse-512c8d570527 https://medium.com/criteo-engineering/net-threadpool-starvat...