I have been using async
/await
for a while, but delved deeper recently, and read a lot of best practice tips saying to by default always use ConfigureAwait(false)
to prevent deadlocks and improve performance.
I just want to make sure I am not missing something when I presume this only applies when the is an actual current SynchronizationContext
or TaskScheduler
in play, correct?
If I have a Windows service app that is responding to messages/commands/etc. asynchronously, it always just uses the default scheduler = probably the same threadpool thread that the awaitable completed on will execute the continuation, thus no deadlock and no performance difference can be had from using ConfigureAwait(false)
, correct?
It's not like I can't put it there, but I hate noisey code so much...