On 25 Feb 2021, at 13:14, Yves Duprat email@example.com wrote:
I'm wondering why Barrier object does not exist in the synchronization primitives of the asyncio lib while it is present in threading and multiprocessing libs ? This may not be the right place to ask this question, but I never found an answer on the web. Thanks for your help.
I'm assuming that the barrier you are speaking of is the mechanism that is used to synchronise threads/processes running in parallel to prevent data races.
With async code that is never an issue. Each function runs to completion uninterrupted. There are no data races. Each time a async function runs it can know that the state of the objects it uses will not be changed while it is running.
Yves _______________________________________________ Python-ideas mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://firstname.lastname@example.org/message/IAFAH7... Code of Conduct: http://python.org/psf/codeofconduct/