[all-commits] [llvm/llvm-project] 5d74c4: DirectoryWatcher: add an implementation for Windows

Saleem Abdulrasool via All-commits all-commits at lists.llvm.org
Fri Oct 9 13:56:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5d74c435117526616d2c2665f030263b8f60da1b
      https://github.com/llvm/llvm-project/commit/5d74c435117526616d2c2665f030263b8f60da1b
  Author: Saleem Abdulrasool <compnerd at compnerd.org>
  Date:   2020-10-09 (Fri, 09 Oct 2020)

  Changed paths:
    M clang/lib/DirectoryWatcher/windows/DirectoryWatcher-windows.cpp
    M clang/unittests/DirectoryWatcher/CMakeLists.txt

  Log Message:
  -----------
  DirectoryWatcher: add an implementation for Windows

This implements the directory watcher on Windows.  It does the most
naive thing for simplicity.  ReadDirectoryChangesW is used to monitor
the changes.  However, in order to support interruption, we must use
overlapped IO, which allows us to use the blocking, synchronous
mechanism.  We create a thread to post the notification to the consumer
to allow the monitoring to continue.  The two threads communicate via a
locked queue.

Differential Revision: https://reviews.llvm.org/D88666
Reviewed By: Adrian McCarthy




More information about the All-commits mailing list