Use an RLock for session locking.
authorFredrik Tolf <fredrik@dolda2000.com>
Thu, 24 May 2012 03:31:24 +0000 (05:31 +0200)
committerFredrik Tolf <fredrik@dolda2000.com>
Thu, 24 May 2012 03:31:24 +0000 (05:31 +0200)
wrw/session.py

index 1239ecd..cf2d792 100644 (file)
@@ -19,7 +19,7 @@ class session(object):
     def __init__(self, expire = 86400 * 7):
         self.id = hexencode(gennonce(16))
         self.dict = {}
-        self.lock = threading.Lock()
+        self.lock = threading.RLock()
         self.ctime = self.atime = self.mtime = int(time.time())
         self.expire = expire
         self.dctl = set()