Fix deadlock in SubstitutionGoal

We were relying on SubstitutionGoal's destructor releasing the lock,
but if a goal is a top-level goal, the destructor won't run in a
timely manner since its reference count won't drop to zero.  So
release it explicitly.

Fixes #178.
This commit is contained in:
Eelco Dolstra 2014-02-27 13:31:33 +01:00
parent 7c7707638a
commit 29cde917fe

View File

@ -2852,6 +2852,7 @@ void SubstitutionGoal::finished()
worker.store.registerValidPath(info2);
outputLock->setDeletion(true);
outputLock.reset();
worker.store.markContentsGood(storePath);