[PATCH] D70563: Use kevent queue for detecting file unlocking in LockFileManager
Paul Taykalo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 21 13:26:13 PST 2019
PaulTaykalo created this revision.
PaulTaykalo added reviewers: svenvh, bruno.
PaulTaykalo added projects: LLVM, clang.
Herald added subscribers: llvm-commits, dexonsmith, hiraditya, krytarowski, srhines.
LockFileManager is used for acquiring and watching .lock files
Current implementation that checks for lock release, is using exponentially growing timeouts.
In some cases, dependent module compilation time is relatively long (tens of seconds). In this case, timeouts could lead to the situation, when a process, watching for a lock release will just sleep for another ten of seconds after lock release.
Provided implementation is using kqueue for listening for file system changes process termination. This allows preventing unneded timeouts in the most of the cases.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D70563
Files:
llvm/include/llvm/Support/LockFileManager.h
llvm/lib/Support/LockFileManager.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70563.230518.patch
Type: text/x-patch
Size: 6636 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191121/3ba7bb82/attachment.bin>
More information about the llvm-commits
mailing list