DataObjects-NET / dataobjects-net

https://dataobjects.net
MIT License
61 stars 25 forks source link

Disable `.ConfigureAwait(false)` by conditional compilation constant `DO_CONFIGURE_AWAIT_FALSE` #337

Open SergeiPavlov opened 1 year ago

SergeiPavlov commented 1 year ago

In typical ASP.NET apps .ConfigureAwait(false) creates unnecessary overhead (a few nanoseconds). .ConfigureAwait(false) makes sense mostly for UI applications, with non-null Synchronization Context

This can be switched off by setting environment variable DO_CONFIGURE_AWAIT_FALSE=false at compile time