by BiteCode_dev · 5y ago · 0 comments
I would say it's pretty hard to add an await in the wrong place, although not impossible. I think it's easier to:
- forget an await
- forget a asyncio.wait or a asyncio.gather
The later is very common, and is being addressed by the structured concurrency movement we've seen with Trio and the likes. This should end up in mainline python eventually because it is, indeed, a problem.
However, it's still way easier to shot yourself in the foot with concurrency and threads than with asyncio.
However, it is harder to startup with asyncio than with threads, because there is more to learn just to boot.
Do you use a typechecker?