Is D1.update(D2) still atomic with this implementation? https://docs.python.org/3.11/faq/library.html#what-kinds-of-global-value-mutation-are-thread-safe
On Mon, 11 Oct 2021, 17:54 Sam Gross, <colesb...@gmail.com> wrote: > On Fri, Oct 8, 2021 at 12:04 PM Nathaniel Smith <n...@pobox.com> wrote: > >> I notice the fb.com address -- is this a personal project or something >> facebook is working on? what's the relationship to Cinder, if any? >> > > It is a Facebook project, at least in the important sense that I work on it > as an employee at Facebook. (I'm currently the only person working on it.) > I keep in touch with some of the Cinder devs regularly and they've advised > on the project, but otherwise the two projects are unrelated. > > >> Regarding the tricky lock-free dict/list reads: I guess the more >> straightforward approach would be to use a plain ol' mutex that's >> optimized for this kind of fine-grained per-object lock with short >> critical sections and minimal contention, like WTF::Lock. Did you try >> alternatives like that? If so, I assume they didn't work well -- can >> you give more details? >> > > I'm using WTF::Lock style locks for dict/list mutations. I did an > experiment > early on where I included locking around reads as well. I think it slowed > down > the pyperformance benchmarks by ~10% on average, but I can't find my notes > so I plan to re-run the experiment. > > Additionally, because dicts are used for things like global variables, I'd > expect > that locks around reads prevent efficient scaling, but I haven't measured > this. > > _______________________________________________ > 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/V76ZRBM6UMGYU7FTNENMOOW7OYEFYQ5Q/ > Code of Conduct: http://python.org/psf/codeofconduct/ >
_______________________________________________ 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/5RKLUR2DYJ53OIRX74WVZCVRGW7VUXLF/ Code of Conduct: http://python.org/psf/codeofconduct/