mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 10:46:15 +02:00
Respect max-substitution-jobs again
This broke in #11005. Any number of PathSubstitutionGoals would be woken up by a single build slot becoming available. If there are a lot of substitution goals active, this could lead to us running out of file descriptors (especially on macOS where the default limit is 256).
This commit is contained in:
parent
ef1ac0d117
commit
a33cb8af56
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ Goal::Co PathSubstitutionGoal::tryToRun(StorePath subPath, nix::ref<Store> sub,
|
||||||
/* Make sure that we are allowed to start a substitution. Note that even
|
/* Make sure that we are allowed to start a substitution. Note that even
|
||||||
if maxSubstitutionJobs == 0, we still allow a substituter to run. This
|
if maxSubstitutionJobs == 0, we still allow a substituter to run. This
|
||||||
prevents infinite waiting. */
|
prevents infinite waiting. */
|
||||||
if (worker.getNrSubstitutions() >= std::max(1U, (unsigned int) settings.maxSubstitutionJobs)) {
|
while (worker.getNrSubstitutions() >= std::max(1U, (unsigned int) settings.maxSubstitutionJobs)) {
|
||||||
worker.waitForBuildSlot(shared_from_this());
|
worker.waitForBuildSlot(shared_from_this());
|
||||||
co_await Suspend{};
|
co_await Suspend{};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue