It is recommended, for example, here to make the most of ConfigureAwait(false)
expected tasks.
Does this recommendation also apply to methods returning IAsyncAction
, for example StreamSocket.ConnectAsync()
?
That is, instead of just writing this in my class library:
await socket.ConnectAsync(hostName, port);
Should I write this?
await socket.ConnectAsync(hostName, port).AsTask().ConfigureAwait(false);
source
share