Is D1.update(D2) still atomic with this implementation?

On Mon, 11 Oct 2021, 17:54 Sam Gross, <> wrote:
On Fri, Oct 8, 2021 at 12:04 PM Nathaniel Smith <> wrote:
I notice the 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 --
To unsubscribe send an email to
Message archived at
Code of Conduct: