[Zodb-checkins] CVS: ZODB3/ZEO - ClientStorage.py:1.73.2.24.2.1
Jeremy Hylton
jeremy at zope.com
Thu Jun 12 15:59:14 EDT 2003
Update of /cvs-repository/ZODB3/ZEO
In directory cvs.zope.org:/tmp/cvs-serv13007/ZEO
Modified Files:
Tag: jeremy-more-mysteries-branch
ClientStorage.py
Log Message:
Use deferred calls for load() and tpc_finish().
=== ZODB3/ZEO/ClientStorage.py 1.73.2.24 => 1.73.2.24.2.1 ===
--- ZODB3/ZEO/ClientStorage.py:1.73.2.24 Wed Jun 11 19:11:32 2003
+++ ZODB3/ZEO/ClientStorage.py Thu Jun 12 14:59:13 2003
@@ -631,8 +631,11 @@
self._incLoadStatus(oid)
+ self._lock.acquire()
+ msgid = self._server.deferred_call("zeoLoad", self._lock.release, oid)
+
try:
- p, s, v, pv, sv = self._server.zeoLoad(oid)
+ p, s, v, pv, sv = self._server.deferred_result(msgid)
except:
self._lock.acquire()
try:
@@ -851,13 +854,15 @@
self._lock.acquire() # for atomic processing of invalidations
try:
self._update_cache()
+ if f is not None:
+ f()
finally:
- self._lock.release()
-
- if f is not None:
- f()
+ # XXX are we guaranteed that the lock will be released?
+ msgid = self._server.deferred_call("tpc_finish",
+ self._lock.release,
+ self._serial)
- self._server.tpc_finish(self._serial)
+ self._server.deferred_result(msgid)
r = self._check_serials()
assert r is None or len(r) == 0, "unhandled serialnos: %s" % r
More information about the Zodb-checkins
mailing list