If async-await doesn’t create any additional threads, then how does it make applications responsive?

Time and time again, I see it said that using asyncawait 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 asyncawait 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.

11 Answers
11

Leave a Comment