Commit 169e2441 authored by Jim Fulton's avatar Jim Fulton

Changed to propigate errors raised by _begin.

Also changed completion code to check registered status and
avoid completion logic if not registered, which would be the case if
_begin failed.
parent 70cc0d1e
......@@ -99,17 +99,20 @@ class THUNKED_TM(TM.TM):
self._begin()
except:
thunk_lock.release()
raise
else:
self._registered=1
def tpc_finish(self, *ignored):
try: self._finish()
finally:
thunk_lock.release()
self._registered=0
if self._registered:
try: self._finish()
finally:
thunk_lock.release()
self._registered=0
def abort(self, *ignored):
try: self._abort()
finally:
thunk_lock.release()
self._registered=0
if self._registered:
try: self._abort()
finally:
thunk_lock.release()
self._registered=0
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