[concurrency] Adding shared objects to Python?

Mike Meyer mwm at mired.org
Thu Feb 16 05:57:15 CET 2012

Ok, this is an off-the-wall idea. I have no idea if it's even
feasible, so I'm asking here. I'm hoping that someone familiar enough
with the insides of Python to know if it'll work can comment on it.

Can we add a mechanism to be named later to Python that lets us tell
the interpreter that some object will be shared, and then have the
interpreter put it in an mmap'ed segment that will be/is shared via

For some objects - the builtin non-container types, for instance -
this trivially works. For others, it's not so clear. What happens if I
create a shared object that contains non-shared objects? How does time
of creation of the object and the sharing subprocess play into this?
Can I create an shared instance of a class that's not shared?

Basically, it looks like a mess to me, but maybe someone smarter than
I who knows the interpreter internals can figure out an implementable
set of constraints that's still useful.

Mike Meyer <mwm at mired.org>		http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org

More information about the concurrency-sig mailing list