提交 e1d7f89a authored 作者: Olivier Delalleau's avatar Olivier Delalleau

Compilation directory lock is now disabled again by default, due to lock files…

Compilation directory lock is now disabled again by default, due to lock files persisting after e.g. manually interrupting the compilation
上级 325b0739
...@@ -12,7 +12,9 @@ def get_lock(): ...@@ -12,7 +12,9 @@ def get_lock():
get_lock.n_lock = 0 get_lock.n_lock = 0
get_lock.lock_dir = os.path.join(compiledir.get_compiledir(), 'lock_dir') get_lock.lock_dir = os.path.join(compiledir.get_compiledir(), 'lock_dir')
if not hasattr(get_lock, 'lock_is_enabled'): if not hasattr(get_lock, 'lock_is_enabled'):
get_lock.lock_is_enabled = True # Currently lock is disabled by default, due to the annoying
# persistence of lock files when compilation is being interrupted.
get_lock.lock_is_enabled = False
# Only really try to acquire the lock if we do not have it already. # Only really try to acquire the lock if we do not have it already.
if get_lock.lock_is_enabled and get_lock.n_lock == 0: if get_lock.lock_is_enabled and get_lock.n_lock == 0:
lock(get_lock.lock_dir, timeout = 60, verbosity = 10) lock(get_lock.lock_dir, timeout = 60, verbosity = 10)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论