def _rootCacheLock(self, shared=1):
lockType = fcntl.LOCK_EX
if shared:
lockType = fcntl.LOCK_SH
try:
fcntl.lockf(self.rootCacheLock.fileno(), lockType | fcntl.LOCK_NB)
except IOError:
self.state.start("Waiting for rootcache lock")
fcntl.lockf(self.rootCacheLock.fileno(), lockType)
self.state.finish("Waiting for rootcache lock")
评论列表
文章目录