Can anyone direct me to a good resource on how to do MROW Locking efficiently in Python. The recipe at http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/413393 is actually quite inefficient (not sure if it is the code or MROW itself).
I have a dictionary (a cache lets say or some sort of index) which needs to be accessed by multiple threads. Most of the time its just being read. Very rarely, I have to iterate over it (sometimes writing, mostly reading), sometimes I have to update a single entry or multiple entries (ala dict.update()). I'd like to know the best way to make this happen (i.e. is MROW really what I am looking for or is there something else?). Is there a good way to do this using the in-built Lock and RLock objects? This project is part of a commercial database product. Prateek -- http://mail.python.org/mailman/listinfo/python-list