On Sat, 18 Apr 2020 19:02:47 +0200 Antoine Pitrou <solip...@pitrou.net> wrote: > > * I do think a minimal synchronization primitive would be nice. > Either a Lock (in the Python sense) or a Semaphore: both should be > relatively easy to provide, by wrapping an OS-level synchronization > primitive. Then you can recreate all high-level synchronization > primitives, like the threading and multiprocessing modules do (using > a Lock or a Semaphore, respectively).
By the way, perhaps this could be even be implemented as making _threading.Lock shareable. This would probably require some changes in the underlying C Lock structure (e.g. pointing to an atomically-refcounted shared control block), but nothing intractable, and reasonably efficient. Regards Antoine. _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/CWSJBHQAFH72EPQRB5HJRP5YWIYDICOZ/ Code of Conduct: http://python.org/psf/codeofconduct/