[Zodb-checkins] CVS: ZODB3/ZODB - BaseStorage.py:1.34.6.2
Jeremy Hylton
jeremy at zope.com
Wed Jul 16 16:35:35 EDT 2003
Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv5686/ZODB
Modified Files:
Tag: zodb33-devel-branch
BaseStorage.py
Log Message:
Change to use locks from the threading module.
=== ZODB3/ZODB/BaseStorage.py 1.34.6.1 => 1.34.6.2 ===
--- ZODB3/ZODB/BaseStorage.py:1.34.6.1 Tue Jul 1 15:34:10 2003
+++ ZODB3/ZODB/BaseStorage.py Wed Jul 16 15:35:28 2003
@@ -16,8 +16,10 @@
$Id$
"""
import cPickle
-import ThreadLock, bpthread
-import time, UndoLogCompatible
+import threading
+import time
+
+import UndoLogCompatible
import POSException
from Persistence.TimeStamp import TimeStamp
z64='\0'*8
@@ -33,12 +35,12 @@
self.__name__=name
# Allocate locks:
- l=ThreadLock.allocate_lock()
- self._lock_acquire=l.acquire
- self._lock_release=l.release
- l=bpthread.allocate_lock()
- self._commit_lock_acquire=l.acquire
- self._commit_lock_release=l.release
+ l = threading.RLock()
+ self._lock_acquire = l.acquire
+ self._lock_release = l.release
+ l = threading.Lock()
+ self._commit_lock_acquire = l.acquire
+ self._commit_lock_release = l.release
t=time.time()
t=self._ts=apply(TimeStamp,(time.gmtime(t)[:5]+(t%60,)))
More information about the Zodb-checkins
mailing list