From f398949b40624488b54b35d446a9b5ac46101739 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 8 Apr 2016 18:07:13 +0200 Subject: Make LocalStore thread-safe Necessary for multi-threaded commands like "nix verify-paths". --- src/libutil/sync.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libutil/sync.hh') diff --git a/src/libutil/sync.hh b/src/libutil/sync.hh index c99c098ac..ebe64ffbd 100644 --- a/src/libutil/sync.hh +++ b/src/libutil/sync.hh @@ -22,11 +22,11 @@ namespace nix { scope. */ -template +template class Sync { private: - std::mutex mutex; + M mutex; T data; public: @@ -38,7 +38,7 @@ public: { private: Sync * s; - std::unique_lock lk; + std::unique_lock lk; friend Sync; Lock(Sync * s) : s(s), lk(s->mutex) { } public: -- cgit v1.2.3