1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-27 08:31:16 +02:00

Use BSD instead of POSIX file locks

POSIX file locks are essentially incompatible with multithreading. BSD
locks have much saner semantics. We need this now that there can be
multiple concurrent LocalStore::buildPaths() invocations.
This commit is contained in:
Eelco Dolstra 2018-10-04 15:03:03 +02:00
parent ec415d7166
commit e349f2c0a3
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
5 changed files with 45 additions and 107 deletions

View file

@ -16,8 +16,6 @@ enum LockType { ltRead, ltWrite, ltNone };
bool lockFile(int fd, LockType lockType, bool wait);
MakeError(AlreadyLocked, Error);
class PathLocks
{
private:
@ -37,6 +35,4 @@ public:
void setDeletion(bool deletePaths);
};
bool pathIsLockedByMe(const Path & path);
}