[Python-ideas] Fwd: Concurrent safety?

Stephen J. Turnbull stephen at xemacs.org
Sat Nov 5 14:05:09 CET 2011


MRAB writes:

 > my understanding is that in an implementation which uses references the
 > reference is actually an index into a table which contains the
 > addresses of the objects, therefore you would be locking in order of
 > increasing index.

Ah, OK.  So a reference is actually an object in the sense of an
identifiable region of memory, but it's not a Python object.  When I
see "reference" I think of C++ references or git refs, which are just
names, and an object can have many references.  But the scheme you
describe is like a C stdio file descriptor, and presumably is an
indirection which allows relocating Python objects in memory.  You can
even relocate the table in such a scheme.




More information about the Python-ideas mailing list