Null out lock vars so that __del__ gets called
The builder was holding lock variables in the loop which means that sometimes a state.Lock object would be created for the same file-id twice, triggering the assertion. Assign the lock variables to None to ensure that the state.Lock objects are destroyed before creating the next one in the loop.
This commit is contained in:
parent
f4b4c400b2
commit
9354e78871
1 changed files with 2 additions and 0 deletions
|
|
@ -348,6 +348,7 @@ def main(targets, shouldbuildfunc):
|
|||
BuildJob(t, f, lock, shouldbuildfunc, done).start()
|
||||
state.commit()
|
||||
assert(state.is_flushed())
|
||||
lock = None
|
||||
|
||||
del lock
|
||||
|
||||
|
|
@ -401,5 +402,6 @@ def main(targets, shouldbuildfunc):
|
|||
else:
|
||||
BuildJob(t, state.File(id=fid), lock,
|
||||
shouldbuildfunc, done).start()
|
||||
lock = None
|
||||
state.commit()
|
||||
return retcode[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue