[PATCH] D58418: [clang][DirectoryWatcher] Upstream DirectoryWatcher
Jan Korous via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed May 15 19:02:06 PDT 2019
jkorous updated this revision to Diff 199712.
jkorous added a comment.
A major clean-up.
changelog
=========
**general**
- specification, documentation, tests
- returning only filenames instead of paths (or empty string when the event is related to the watched dir itself)
- removed unsound event deduplication during/right after the initial scan
- simplified how is OS-specific implementation selected
**linux**
- properly terminating threads
- added pthreads to fix shared libs build
- handle IN_DELETE_SELF, IN_IGNORED
- IN_EXCL_UNLINK
**macos**
- simplified synchronization by removing semaphores
- workarounds in FSEvents use
I am not entirely happy about my tests - since we're handling notifications from kernel asynchronously it's hard to write a deterministic test. I just use some 100 ms sleeps as a workaround. Happy to use something more robust if anyone has some ideas. Tests seem fine with msan & tsan on linux and tsan on macos but given their scope it doesn't mean that much.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58418/new/
https://reviews.llvm.org/D58418
Files:
clang/cmake/modules/AddClang.cmake
clang/include/clang/DirectoryWatcher/DirectoryWatcher.h
clang/lib/CMakeLists.txt
clang/lib/DirectoryWatcher/CMakeLists.txt
clang/lib/DirectoryWatcher/DirectoryScanner.cpp
clang/lib/DirectoryWatcher/DirectoryScanner.h
clang/lib/DirectoryWatcher/linux/DirectoryWatcher-linux.cpp
clang/lib/DirectoryWatcher/mac/DirectoryWatcher-mac.cpp
clang/unittests/CMakeLists.txt
clang/unittests/DirectoryWatcher/CMakeLists.txt
clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58418.199712.patch
Type: text/x-patch
Size: 43712 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190516/e3a2b870/attachment-0001.bin>
More information about the cfe-commits
mailing list