[PATCH] D40328: Use a single file name to represent a lock

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 22 08:12:47 PST 2017


Zachary Turner via Phabricator <reviews at reviews.llvm.org> writes:

> zturner added a comment.
>
> Out of curiosity, what do we use `LockFileManager` for in LLVM, and
> what are you trying to use it for in this specific use case?

I think the only current use is for modules.

I don't have any use of LockFileManager in mind. I am just trying to
have TempFile use a DeleteFile file disposition on windows.

> Because of certain quirks in Windows file system semantics, lock files are in general not a robust solution most of the time -- maybe even **ever**.
>
> If all use cases of lock files are to synchronize cross-process, why don't we just re-write `LockFileManager` to use a named mutex?

It could probably also use flock on posix, but it is not clear how that
works on network file systems.

Since I am not a direct user of LockFileManager I thought it better to
make this smaller change.

Cheers,
Rafael


More information about the llvm-commits mailing list