[Zodb-checkins] SVN: ZODB/trunk/src/ZODB/BaseStorage.py Make lock non-private so subclasses can use it with with.
Jim Fulton
jim at zope.com
Fri Feb 5 16:55:00 EST 2010
Log message for revision 108804:
Make lock non-private so subclasses can use it with with.
Changed:
U ZODB/trunk/src/ZODB/BaseStorage.py
-=-
Modified: ZODB/trunk/src/ZODB/BaseStorage.py
===================================================================
--- ZODB/trunk/src/ZODB/BaseStorage.py 2010-02-05 21:54:21 UTC (rev 108803)
+++ ZODB/trunk/src/ZODB/BaseStorage.py 2010-02-05 21:54:59 UTC (rev 108804)
@@ -83,12 +83,12 @@
log.debug("create storage %s", self.__name__)
# Allocate locks:
- self.__lock = threading.RLock()
+ self._lock = threading.RLock()
self.__commit_lock = threading.Lock()
# Comment out the following 4 lines to debug locking:
- self._lock_acquire = self.__lock.acquire
- self._lock_release = self.__lock.release
+ self._lock_acquire = self._lock.acquire
+ self._lock_release = self._lock.release
self._commit_lock_acquire = self.__commit_lock.acquire
self._commit_lock_release = self.__commit_lock.release
@@ -114,7 +114,7 @@
f = sys._getframe(1)
sys.stdout.write("[la(%s:%s)\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush()
- self.__lock.acquire(*args)
+ self._lock.acquire(*args)
sys.stdout.write("la(%s:%s)]\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush()
@@ -122,7 +122,7 @@
f = sys._getframe(1)
sys.stdout.write("[lr(%s:%s)\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush()
- self.__lock.release(*args)
+ self._lock.release(*args)
sys.stdout.write("lr(%s:%s)]\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush()
More information about the Zodb-checkins
mailing list