Commit c0a5d90b authored by Jeremy Hylton's avatar Jeremy Hylton

Fix one locking glitch, add comment about the other.

parent c883752e
......@@ -587,6 +587,7 @@ class ClientStorage(object):
self._pickler.fast = 1 # Don't use the memo
# XXX should batch these operations for efficiency
# XXX need to acquire lock...
for oid, tid, version in self._cache.contents():
server.verify(oid, version, tid)
self._pending_server = server
......@@ -1098,7 +1099,11 @@ class ClientStorage(object):
def invalidateTransaction(self, tid, args):
"""Invalidate objects modified by tid."""
self._cache.setLastTid(tid)
self._lock.acquire()
try:
self._cache.setLastTid(tid)
finally:
self._lock.release()
if self._pickler is not None:
log2(BLATHER,
"Transactional invalidation during cache verification")
......
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