Forum Discussion
amanjainits
Feb 26, 2022Copper Contributor
Async and Await Query
Why the output is like this
123
XYZ
as per my understanding, it should print XYZ first, as I am not writing await in line no. 50
1 Reply
- svickCopper Contributor
The method Test is not async, which means it will block the current thread while waiting. And since that method is invokes before any await, that is the same thread as the one that executes PrintData, which means Test is effectively blocking PrintData.