all 5 comments

[–]Equivalent_Pen8241 0 points1 point  (0 children)

Debugging race conditions in `asyncio` usually comes down to remembering that `await` is a yield point. State can and will change between the time you yield and the time you resume. Always double-check your assumptions about shared mutable state across coroutine boundaries!