
On 25 Feb 2021, at 13:14, Yves Duprat <yduprat@gmail.com> wrote:
Hi,the list,
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. Barry
Yves _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-leave@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/IAFAH7... Code of Conduct: http://python.org/psf/codeofconduct/