Commit 41aaa6f2 authored by Hanno Schlichting's avatar Hanno Schlichting

Drop the dependency on the ThreadLock distribution, by using Python's thread module instead.

parent 6e83525c
......@@ -41,7 +41,6 @@ eggs =
Persistence
Record
RestrictedPython
ThreadLock
initgroups
tempstorage
ZopeUndo
......
......@@ -11,6 +11,9 @@ Trunk (unreleased)
Restructuring
+++++++++++++
- Drop the dependency on the ThreadLock distribution, by using Python's thread
module instead.
- Removed Zope2's own mkzeoinstance script. If you want to set up ZEO instances
please install the zope.mkzeoinstance and use its script.
......
......@@ -66,7 +66,6 @@ setup(name='Zope2',
'Persistence',
'Record',
'RestrictedPython',
'ThreadLock',
'ZConfig',
'ZODB3',
'ZopeUndo',
......
......@@ -11,11 +11,13 @@
#
##############################################################################
import TM, ThreadLock
import thread
import TM
from TM import Surrogate
import transaction
thunk_lock=ThreadLock.allocate_lock()
thunk_lock = thread.allocate_lock()
class THUNKED_TM(TM.TM):
"""A big heavy hammer for handling non-thread safe DAs
......@@ -35,14 +37,16 @@ class THUNKED_TM(TM.TM):
def tpc_finish(self, *ignored):
if self._registered:
try: self._finish()
try:
self._finish()
finally:
thunk_lock.release()
self._registered=0
def abort(self, *ignored):
if self._registered:
try: self._abort()
try:
self._abort()
finally:
thunk_lock.release()
self._registered=0
......@@ -14,7 +14,6 @@ Persistence = 2.13.1
Record = 2.13.0
RestrictedPython = 3.5.2
tempstorage = 2.11.2
ThreadLock = 2.13.0
ZopeUndo = 2.12.0
# Zope2 dependencies
......
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