comparison MoinMoin/caching.py @ 1309:238c43cb8877

lock: LazyReadLock, LazyWriteLock == do nothing. Only for POSIX OS and POSIX style of code using that kind of locks (see comments there).
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Thu, 17 Aug 2006 13:03:53 +0200
parents 6bc162aba29d
children c4f6af5ee295
comparison
equal deleted inserted replaced
1308:9c6c07e63832 1309:238c43cb8877
41 elif scope == 'farm': 41 elif scope == 'farm':
42 self.arena_dir = os.path.join(request.cfg.cache_dir, '__common__', arena) 42 self.arena_dir = os.path.join(request.cfg.cache_dir, '__common__', arena)
43 filesys.makeDirs(self.arena_dir) 43 filesys.makeDirs(self.arena_dir)
44 if self.locking: 44 if self.locking:
45 self.lock_dir = os.path.join(self.arena_dir, '__lock__') 45 self.lock_dir = os.path.join(self.arena_dir, '__lock__')
46 self.rlock = lock.ReadLock(self.lock_dir, 60.0) 46 self.rlock = lock.LazyReadLock(self.lock_dir, 60.0)
47 self.wlock = lock.WriteLock(self.lock_dir, 60.0) 47 self.wlock = lock.LazyWriteLock(self.lock_dir, 60.0)
48 48
49 def _filename(self): 49 def _filename(self):
50 return os.path.join(self.arena_dir, self.key) 50 return os.path.join(self.arena_dir, self.key)
51 51
52 def _tmpfilename(self): 52 def _tmpfilename(self):