Time and time again, I see it said that using async
–await
doesn’t create any additional threads. That doesn’t make sense because the only ways that a computer can appear to be doing more than 1 thing at a time is
- Actually doing more than 1 thing at a time (executing in parallel, making use of multiple processors)
- Simulating it by scheduling tasks and switching between them (do a little bit of A, a little bit of B, a little bit of A, etc.)
So if async
–await
does neither of those, then how can it make an application responsive? If there is only 1 thread, then calling any method means waiting for the method to complete before doing anything else, and the methods inside that method have to wait for the result before proceeding, and so forth.