1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-14 13:01:05 +01:00

LocalStore: Get rid of recursive_mutex

This commit is contained in:
Eelco Dolstra 2020-11-03 12:52:57 +01:00
parent 797a52e31d
commit e8c379555f
5 changed files with 22 additions and 15 deletions

View file

@ -3245,7 +3245,7 @@ void DerivationGoal::registerOutputs()
if (!oldInfo.ultimate) {
oldInfo.ultimate = true;
worker.store.signPathInfo(oldInfo);
worker.store.registerValidPaths({ std::move(oldInfo) });
worker.store.registerValidPaths({{oldInfo.path, oldInfo}});
}
continue;
@ -3275,7 +3275,7 @@ void DerivationGoal::registerOutputs()
isn't statically known so that we can safely unlock the path before
the next iteration */
if (newInfo.ca)
worker.store.registerValidPaths({newInfo});
worker.store.registerValidPaths({{newInfo.path, newInfo}});
infos.emplace(outputName, std::move(newInfo));
}
@ -3350,7 +3350,7 @@ void DerivationGoal::registerOutputs()
{
ValidPathInfos infos2;
for (auto & [outputName, newInfo] : infos) {
infos2.push_back(newInfo);
infos2.insert_or_assign(newInfo.path, newInfo);
}
worker.store.registerValidPaths(infos2);
}