Commit 78dd3098 authored by Jim Fulton's avatar Jim Fulton

parent 8721048e
...@@ -83,12 +83,12 @@ class BaseStorage(UndoLogCompatible): ...@@ -83,12 +83,12 @@ class BaseStorage(UndoLogCompatible):
log.debug("create storage %s", self.__name__) log.debug("create storage %s", self.__name__)
# Allocate locks: # Allocate locks:
self.__lock = threading.RLock() self._lock = threading.RLock()
self.__commit_lock = threading.Lock() self.__commit_lock = threading.Lock()
# Comment out the following 4 lines to debug locking: # Comment out the following 4 lines to debug locking:
self._lock_acquire = self.__lock.acquire self._lock_acquire = self._lock.acquire
self._lock_release = self.__lock.release self._lock_release = self._lock.release
self._commit_lock_acquire = self.__commit_lock.acquire self._commit_lock_acquire = self.__commit_lock.acquire
self._commit_lock_release = self.__commit_lock.release self._commit_lock_release = self.__commit_lock.release
...@@ -114,7 +114,7 @@ class BaseStorage(UndoLogCompatible): ...@@ -114,7 +114,7 @@ class BaseStorage(UndoLogCompatible):
f = sys._getframe(1) f = sys._getframe(1)
sys.stdout.write("[la(%s:%s)\n" % (f.f_code.co_filename, f.f_lineno)) sys.stdout.write("[la(%s:%s)\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush() 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.write("la(%s:%s)]\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush() sys.stdout.flush()
...@@ -122,7 +122,7 @@ class BaseStorage(UndoLogCompatible): ...@@ -122,7 +122,7 @@ class BaseStorage(UndoLogCompatible):
f = sys._getframe(1) f = sys._getframe(1)
sys.stdout.write("[lr(%s:%s)\n" % (f.f_code.co_filename, f.f_lineno)) sys.stdout.write("[lr(%s:%s)\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush() 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.write("lr(%s:%s)]\n" % (f.f_code.co_filename, f.f_lineno))
sys.stdout.flush() sys.stdout.flush()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment