3 ms·
Async is basically a super convenient way to interact with an event loop. Any time you call `await` you are saying "schedule an event on the event loop, and ca
by war1025 6y ago
Async is basically a super convenient way to interact with an event loop.
Any time you call `await` you are saying "schedule an event on the event loop, and call back into this method with the result once it's available"
Multi-threaded code is good for some things, but often you need an event loop to keep things reasonable (GUI code for example). That's where async / await really shines.