mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
nix store copy-sigs: Use http-connections setting to control parallelism
Previously it used the `ThreadPool` default,
i.e. `std:🧵:hardware_concurrency()`. But copying signatures is
not primarily CPU-bound so it makes more sense to use the
`http-connections` setting (since we're typically copying from/to a
binary cache).
This commit is contained in:
parent
6417863ce9
commit
6b6ceddf72
1 changed files with 2 additions and 1 deletions
|
|
@ -3,6 +3,7 @@
|
|||
#include "nix/main/shared.hh"
|
||||
#include "nix/store/store-open.hh"
|
||||
#include "nix/util/thread-pool.hh"
|
||||
#include "nix/store/filetransfer.hh"
|
||||
|
||||
#include <atomic>
|
||||
|
||||
|
|
@ -38,7 +39,7 @@ struct CmdCopySigs : StorePathsCommand
|
|||
for (auto & s : substituterUris)
|
||||
substituters.push_back(openStore(s));
|
||||
|
||||
ThreadPool pool;
|
||||
ThreadPool pool{fileTransferSettings.httpConnections};
|
||||
|
||||
std::atomic<size_t> added{0};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue