As far as I know, there isn't a synchronization context in a Windows Service application.
await fooTask.ConfigureAwait(false)
give me any benefits in Windows Services? Does await
fooTask.ConfigureAwait(false)
give me any benefits in Windows Services? Are there any pitfalls to this?
There is no pitfalls, for as long as there is no code which would install a synchronization context. There is no benefits either, for as long as this code runs on a thread without synchronization context.
Nevertheless, this code still would make sense for a shared class library, aimed to be used in different execution environments.
If you did have a synchronization context, there might be some pitfalls.
Updated: it's now 2021 and here's what I think about using ConfigureAwait
these days.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With