builder: the (WAITING) message from --debug-locks didn't print every time.

This was misleading; we end up waiting synchronously for a lock more often
than I thought, and it really does slow down builds.
This commit is contained in:
Avery Pennarun 2010-12-10 22:37:39 -08:00
commit 16bebd21b5

View file

@ -253,7 +253,7 @@ def main(targets, shouldbuildfunc):
lock = state.Lock(fid) lock = state.Lock(fid)
lock.trylock() lock.trylock()
if not lock.owned: if not lock.owned:
if vars.DEBUG_LOCKS and len(locked) >= 1: if vars.DEBUG_LOCKS:
warn('%s (WAITING)\n' % _nice(t)) warn('%s (WAITING)\n' % _nice(t))
lock.waitlock() lock.waitlock()
assert(lock.owned) assert(lock.owned)