4 ms·
The very short version is that by synchronously blocking on the async method your thread may end up holding a resource (thread context info or the calling threa
by Merad 5y ago
The very short version is that by synchronously blocking on the async method your thread may end up holding a resource (thread context info or the calling thread itself) that the async method needs in order to run its continuations. Here are a couple of more detailed explanations:
https://blog.stephencleary.com/2012/07/dont-block-on-async-code.html https://blog.stephencleary.com/2012/07/dont-block-on-async-c...
https://devblogs.microsoft.com/pfxteam/await-and-ui-and-deadlocks-oh-my/ https://devblogs.microsoft.com/pfxteam/await-and-ui-and-dead...
- endorphine 5y agoNow that's pretty much the answer I was looking for, I believe. This makes things much clearer!