aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/sync.hh
AgeCommit message (Collapse)Author
2024-06-18libutil: tidy Sync and fix its move constructorJade Lovelace
There was a previously-unused move constructor that just called abort, which makes no sense since it ought to just be `= delete` if you don't want one (commit history says it was Eelco doing an optimistic performance optimisation in 2016, so it probably would not pass review today). However, a Lock has some great reasons to be moved! You might need to unlock it early, for instance, or give it to someone else. So we change the move constructor to instead hollow out the moved-from object and make it unusable. Change-Id: Iff2a4c2f7ebd0a558c4866d4dfe526bc8558bed7
2023-03-31Ensure all headers have `#pragma once` and are in API docsJohn Ericson
`///@file` makes them show up in the internal API dos. A tiny few were missing `#pragma once`.
2023-03-31Extend internal API docs, part 2John Ericson
Picking up from #8111. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2018-06-18sync.hh: return cv_status instead of dropping it, in case useful.Will Dietz
2017-08-03Include missing <cstdlib> for abort()Brian McKenna
This is needed to get Nix compiled using Android NDK.
2017-04-06nix-daemon: Disable path info cacheEelco Dolstra
This is useless because the client also caches path info, and can cause problems for long-running clients like hydra-queue-runner (i.e. it may return cached info about paths that have been garbage-collected).
2016-10-12Add some functions needed by hydraEelco Dolstra
2016-04-08Make LocalStore thread-safeEelco Dolstra
Necessary for multi-threaded commands like "nix verify-paths".
2016-02-24std::condition_variable_any -> std::condition_variableEelco Dolstra
The latter is supposed to be more efficient.
2016-02-23RemoteStore: Make thread-safeEelco Dolstra
This allows a RemoteStore object to be used safely from multiple threads concurrently. It will make multiple daemon connections if necessary. Note: pool.hh and sync.hh have been copied from the Hydra source tree.