News for hackers. Stuff that matters.
Re:A Hitchhiker’s Guide to Asynchronous Programming by crazyguitar on Saturday February 29, 2020 @12:08AM (#22448991)
async/await is a better design pattern without considering low-level APIs such as epoll. It is not a new kind of threading/loop. Python provides a user-level scheduler for developers, so they don't need to implement their scheduler from scratch. In my opinion, the reason why using an event loop can acquire better performance is to decrease the number of times to lock some critical sections. Also, this pattern can increase the cache hit and mitigate CPU context switch frequency.

There are no comments on this comment yet.