3 ms·
> For example, in CPython multiple threads can append to a list without a lock or insert items into a dict without a lock, and the data structure will never bec
by needusername 5y ago
> For example, in CPython multiple threads can append to a list without a lock or insert items into a dict without a lock, and the data structure will never become corrupted.
How is this achieved?
> Though it is worth pointing out that Java has a well-defined memory model, and Python doesn't.
Wouldn't you have to at least issue an mfence when a thread enters / exists the GIL?