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:
@@ -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);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user