Locking problems with DorothyLocker
"Thomas Klaeger" <[email protected]> Sat, 18 Sep 2004 22:05:45 +0200
| Newsgroups | gmane.comp.pythin.pyds.devel |
|---|---|
| Message-ID | <414CB139.15460.8769BE@localhost> |
I started using the pyds version from cvs and noticed locking problems if I started pyds with the verbose option. To track down the problems I changed Tool.py at two places: * the tool threads are created with the tool name as thread name * the lock object (DorothyRLock) are created with verbose=True After these changes I noticed that DorothyRLock did not always lock correctly - it seemed to not block if a lock was already acquired by another thread. To correct this I changed the second locking attempt to _RLock.acquire(self, blocking=1) This change removed most of the locking problems, however sometimes I had an error message about prevcontext not being initialized. So I also added some code to always initialize prevcontext to None. Garth, as you have written DorothyLocker, could you please review these patches and submit them to Georg? Regards, Thomas