提交 5f752487 authored 作者: Frederic's avatar Frederic

Keep the lock when we check the key

上级 c9d69119
...@@ -960,6 +960,9 @@ class ModuleCache(object): ...@@ -960,6 +960,9 @@ class ModuleCache(object):
except cPickle.PicklingError: except cPickle.PicklingError:
key_data.remove_key(key) key_data.remove_key(key)
key_broken = True key_broken = True
# We need the lock while we check in case of parallel
# process that could be changing the file at the same
# time.
if (key[0] and not key_broken and if (key[0] and not key_broken and
self.check_for_broken_eq): self.check_for_broken_eq):
self.check_key(key, key_data.key_pkl) self.check_key(key, key_data.key_pkl)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论