News for hackers. Stuff that matters.
Re:Python and Async Simplified (2018) by diarrhea on Saturday October 22, 2022 @06:56AM (#33297184)
I understand async/await in Python to be entirely single-threaded. So is, for example, C#'s implementation: https://learn.microsoft.com/en-us/dotnet/csharp/programming-... ("The async and await keywords don't cause additional threads to be created.")
Re:Python and Async Simplified (2018) by tomnipotent on Saturday October 22, 2022 @06:38PM (#33302868)
Eliminates blocking on IO requests, letting the event loop spend CPU cycles doing non-IO work. Alternative is CPU doing nothing while waiting on IO, which for something like a web app doing lots of small network requests to database/cache can add up to a lot.