thread safe in python

"Eric S. Johansson" <[email protected]> Sat, 07 May 2005 12:39:28 -0400
Newsgroups gmane.comp.db.metakit
Message-ID <[email protected]>
just confirming.  googling indicates that using metakit with the python 
wrapper is thread safe.  still true with python 2.3.5?

the plan is that the metakit would be wrapped in an xmlrpc server and 
that would mediate requests from a variety of clients.  the common view 
would be created before initiating the XML RPC service and will be 
closed when it terminates.  Commits would take place at appropriate 
points.  The view would be shared between all the threads as a global 
entity.  it seems like it would be safe for everyone to read but on a 
read modify write cycle, I should lock.

If anyone is interested, I have a bit of locking code that locks on a 
given key.  it also (I believe) handles the locking relationships 
correctly between r/o and r/w requests. i.e pending r/w requests later 
arriving r/o requests but allow current r/o requesting complete.

I will admit I'm not totally confident that is correct because it is 
hard to test but so far, so good.

its currently part of my anti-spam system (camram.org) but I'm quite 
willing to share.  :-)

---eric

-- 
http://www.wired.com/wired/archive/13.03/view.html?pg=5

The result of the duopoly that currently defines "competition" is that
prices and service suck. We're the world's leader in Internet
technology - except that we're not.
_____________________________________________
Metakit mailing list  -  [email protected]
http://www.equi4.com/mailman/listinfo/metakit