2 ms·
That looks like a good way to understand it, but I think you have "synchronous" and "asynchronous" reversed. When you're running ordinary Python code, it is sy
by Stratoscope 6y ago
That looks like a good way to understand it, but I think you have "synchronous" and "asynchronous" reversed.
When you're running ordinary Python code, it is synchronous - it runs line by line and has control of the CPU. When you await on another function, that is the asynchronous part - your code is suspended until that other code completes. And then after the await is satisfied, your function starts to run synchronously again.