diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-19 16:50:06 +0000 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2020-11-19 16:50:06 +0000 |
commit | 2113ae2d856a208350ccbafdc19e8dda322515b8 (patch) | |
tree | 5e865ee17c08e18bb91f769a36427dbcc1d6185f /src/libstore/derivations.hh | |
parent | 79aa7d95183cbe6c0d786965f0dbff414fd1aa67 (diff) |
Make drv hash modulo memo table thread-safe
Let's get one step closer to the daemon not needing to fork.
Diffstat (limited to 'src/libstore/derivations.hh')
-rw-r--r-- | src/libstore/derivations.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libstore/derivations.hh b/src/libstore/derivations.hh index f9ba935e6..b966d6d90 100644 --- a/src/libstore/derivations.hh +++ b/src/libstore/derivations.hh @@ -210,7 +210,8 @@ DrvHashModulo hashDerivationModulo(Store & store, const Derivation & drv, bool m /* Memoisation of hashDerivationModulo(). */ typedef std::map<StorePath, DrvHashModulo> DrvHashes; -extern DrvHashes drvHashes; // FIXME: global, not thread-safe +// FIXME: global, though at least thread-safe. +extern Sync<DrvHashes> drvHashes; /* Memoisation of `readDerivation(..).resove()`. */ typedef std::map< |