[Python-Dev] Making python C-API thread safe (try 2)

Shane Hathaway shane at zope.com
Fri Sep 12 17:41:42 EDT 2003


Alan Kennedy wrote:
> Which leads to problems with reference counting and garbage
> collection. These would have to take multiple processes into account:
> what happens when a process goes down? Should the objects allocated by
> it be destroyed? Or remain persistent? Until when? If a process died
> in an unclean fashion, it might not delete its references to objects
> cleanly.
> 
> And it gets more complex again when you're dealing with users and
> permissions.
> 
> I think that there are so many questions associated with the approach
> of sharing python objects through shared memory that it will probably
> remain an "application specific" technique for some time to come.
> 
> Though doubtless some more knowledgable person than I will now
> contradict me. Please. :-)

I'd just like to point out that Steffen Viken Valvag has just recently 
(March 2003) researched this, found solutions, and written an 
implementation.

http://poshmodule.sourceforge.net/posh/html/node4.html

That page leaves a few questions about the distributed garbage 
collection unanswered, but it's a nice high-level overview.

I don't know how stable Posh is, but if nothing else it is a convincing 
proof of concept.

Shane






More information about the Python-list mailing list