aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/thread-pool.cc
AgeCommit message (Collapse)Author
2021-12-22Remove CPU lockingEelco Dolstra
This was already accidentally disabled in ba87b08. It also no longer appears to be beneficial, and in fact slow things down, e.g. when evaluating a NixOS system configuration: elapsed time: median = 3.8170 mean = 3.8202 stddev = 0.0195 min = 3.7894 max = 3.8600 [rejected, p=0.00000, Δ=0.36929±0.02513]
2017-10-09Fix a hang in ThreadPoolEelco Dolstra
The worker threads could exit prematurely if they finished processing all items while the main thread was still adding items. In particular, this caused hanging nix-store --serve processes in the build farm. Also, process items from the main thread.
2017-09-08ThreadPool: On exception, interrupt the other worker threadsEelco Dolstra
2017-09-08ThreadPool: Improve exception handlingEelco Dolstra
In particular, process() won't return as long as there are active items. This prevents work item lambdas from referring to stack frames that no longer exist.
2016-09-21printMsg(lvlError, ...) -> printError(...) etc.Eelco Dolstra
2016-07-21Fix assertion failure in ThreadPool::enqueue()Eelco Dolstra
2016-04-22ThreadPool: Start doing work as soon as work items are enqueuedEelco Dolstra
2016-03-29Improve SIGINT handling in multi-threaded programsEelco Dolstra
The flag remembering whether an Interrupted exception was thrown is now thread-local. Thus, all threads will (eventually) throw Interrupted. Previously, one thread would throw Interrupted, and then the other threads wouldn't see that they were supposed to quit.
2016-03-29Add "nix verify-paths" commandEelco Dolstra
Unlike "nix-store --verify-path", this command verifies signatures in addition to store path contents, is multi-threaded (especially useful when verifying binary caches), and has a progress indicator. Example use: $ nix verify-paths --store https://cache.nixos.org -r $(type -p thunderbird) ... [17/132 checked] checking ‘/nix/store/rawakphadqrqxr6zri2rmnxh03gqkrl3-autogen-5.18.6’