Hacker News new | ask | show | jobs
by harikb 1860 days ago
While the starvation behavior of cooperative green-threads isn’t ideal as native threads, the idea is that

1. Properly written code will perform well, whether async/await or Go style.

2. Making async easy makes one use it in more places. In additon having caller decide to run something sync or async also makes it way more useful. In Async/await model that can only work if all methods are declared async - very costly in complexity

1 comments

Good way to put what’s wrong with Python async and probably by extension C++ too. The sync-async in both direction need to be symmetrical for it to make sense. Right now in Python async can interact with Python sync quite comfortably but the opposite direction is a literal black hole. I have had to read up on how sync can interact with async multiple times but I’m still not sure what is the idiomatic way and it always feels like it’s on knife edge even when I get something working.

Obviously, the caveat is that I’m just stupid and don’t understand Python async well enough. But I have a feeling that this is common experience

This is the millionth time I’ve come across this post. I always had assumed this post was about Typed / multiple Dispatch for whatever idiotic reason.

So glad that this has been well pointed out. Oof big relief