Cavecrush
Help on how async/await works
Hi everyone, I am currently learning about asynchronous programming in c# and have been reading the documentation at https://learn.microsoft.com/en-us/dotnet/csharp/asynchronous-programming/. I understand how the usage of await will pause execution until the task completes, but I dont fully understand where execution goes after hitting an await statement. The documentation mentions
The await keyword is where the magic happens. It yields control to the caller of the method that performed await, and it ultimately allows a UI to be responsive or a service to be elastic.
What exactly does it mean by the caller of the method that performed await, is it talking about the method that called the method that performed await, or something else?12 replies