Hacker News new | past | comments | ask | show | jobs | submit login

> My understanding is Twisted doesn't suffer from the so-called "what color is your function problem"

It really does. The link you mentioned shows how to delegate some sync work to a thread to make it play nicely, but you wouldn't want to do it in each request for example. Twisted is its own world and either you're in or you're out. The async/await markers are much more generic in this case.

> There's no way to do something like this with async/await, besides some hacky third-party attempts, as far as I know.

Spawn a thread, share a queue, send the sync call you want to do, await on a queue read. It's effectively the same thing twisted is doing there.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: