multiprocessing.Value can be synchronised using a lock, but if I have multiple multiprocessing.Value(s) which I want to synchronise between two processes, then I will have to pass a lock for each multiprocessing.Value. Therefore having a multiprocessing.AtomicValue could prove handy in these cases. I have also described some practical use cases wherein I might need to synchronise multiple values between processes.
> On 13-Sep-2019, at 9:56 PM, Rhodri James <[email protected]> wrote: > > On 13/09/2019 17:07, Vinay Sharma wrote: >> Please see my second mail in this thread, where I have comprehensively >> explained what I mean by atomic types. >> It is nothing but multiprocessing.Value, which can have an Atomic variant to >> be used across processes. > > Doesn't multiprocessing.Value already have a lock option for this exact > purpose? How else would your atomic access work? > > -- > Rhodri James *-* Kynesim Ltd > _______________________________________________ > Python-ideas mailing list -- [email protected] > To unsubscribe send an email to [email protected] > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/[email protected]/message/46TP6F3MLYN7XZT4KWJ5SNADKHP3D2VY/ > Code of Conduct: http://python.org/psf/codeofconduct/ _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/AHGO4QLHL7EFU6HXAAGGNVYISF7JNLQZ/ Code of Conduct: http://python.org/psf/codeofconduct/
