2.6, 3.0, and truly independent intepreters
greg
greg at cosc.canterbury.ac.nz
Sat Oct 25 02:29:52 EDT 2008
Rhamphoryncus wrote:
> A list
> is not shareable, so it can only be used within the monitor it's
> created within, but the list type object is shareable.
Type objects contain dicts, which allow arbitrary values
to be stored in them. What happens if one thread puts
a private object in there? It becomes visible to other
threads using the same type object. If it's not safe
for sharing, bad things happen.
Python's data model is not conducive to making a clear
distinction between "private" and "shared" objects,
except at the level of an entire interpreter.
--
Greg
More information about the Python-list
mailing list