Asyncio enables us to write cooperative concurrent systems. There are no mechanisms to ensure their correctness in terms of safety and liveness . Safety in this context means to remain in an “intended” state and not divert from it. Liveness in this context means to “make progress,” basically that the intended states of the program are reached.
A program consists of critical and uncritical paths of execution. A critical path is characterized by the access of a shared resource. Synchronization in our context means that we ensure mutually exclusive ...