I've read the documentation for ReadDirectoryChangesW()
and also seen the CDirectoryChangeWatcher
project, but neither say why one would want to call it asynchronously. I understand that the current thread will not block, but, at least for the CDirectoryChangeWatcher code that uses a completion port, when it calls GetQueuedCompletionStatus()
, that thread blocks anyway (if there are no changes).
So if I call ReadDirectoryChangesW()
synchronously in a separate thread in the first place that I don't care if it blocks, why would I ever want to call ReadDirectoryChangesW()
asynchronously?