Follow-up to this question. I have a library with many async methods that thinly wrap HttpClient. Effectively they just do some setup and directly return the Task
r
No, ConfigureAwait
as its name suggests, configures the await
. If you don't need to await
then you don't need to configure it.
There's no added value in adding async-await just to use ConfigureAwait
as it only affects your method and not the calling method. If the caller needs to use ConfigureAwait
they will do so themselves.
Having an async method instead of a simple Task
-returning method is a valid choice for many reasons (e.g. exception handling), and it will require using ConfigureAwait
but ConfigureAwait
is not a good reason for doing that by itself.