Revert "Re-Revert "DirectoryWatcher: add an implementation for Windows""
authorSaleem Abdulrasool <compnerd@compnerd.org>
Fri, 18 Jun 2021 23:00:01 +0000 (16:00 -0700)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sat, 19 Jun 2021 16:19:52 +0000 (09:19 -0700)
commitdecfad7d8e9b268654dd2d76a7f5f777502b60a6
tree4338f9453bfdf18b26e61b9a4a2d8b4702889ea2
parent1bcfa84ae908ddcf042163345ffee2d247669e60
Revert "Re-Revert "DirectoryWatcher: add an implementation for Windows""

This reverts commit fb32de9e97af0921242a021e30020ffacf7aa6e2.

Remove the secondary synchronization point as noted by Adrian.  This is
technically only to make the builders happier about tests and should not
be needed.  This also pushes the condition variable setting to after the
watch is actually established (which was the source of the original race
condition, but would normally succeed as the thread shouldn't get put to
sleep immediately on the trigger of the condition variable).

This also was pretested on the chromium builders:
https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/1612/overview.
clang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp
clang/unittests/DirectoryWatcher/CMakeLists.txt