Chromium Code Reviews| Index: base/files/file_path_watcher.h |
| diff --git a/base/files/file_path_watcher.h b/base/files/file_path_watcher.h |
| index 267c03ae00b7bb8600ade73b74236d3e68e12562..0ee56af94016271d3737d94137154c86bca20593 100644 |
| --- a/base/files/file_path_watcher.h |
| +++ b/base/files/file_path_watcher.h |
| @@ -90,9 +90,12 @@ class BASE_EXPORT FilePathWatcher { |
| static bool RecursiveWatchAvailable(); |
| // Invokes |callback| whenever updates to |path| are detected. This should be |
| - // called at most once, and from a MessageLoop of TYPE_IO. Set |recursive| to |
| - // true, to watch |path| and its children. The callback will be invoked on |
| - // the same loop. Returns true on success. |
| + // called at most once. Set |recursive| to true, to watch |path| and its |
| + // children. The callback will be invoked on the same thread. Returns true on |
| + // success. |
| + // |
| + // On Mac, this must be called from a thread that supports |
| + // FileDescriptorWatcher when |recursive| is false. |
|
dcheng
2016/11/23 02:14:25
I don't understand this comment: is there more bac
fdoray
2016/11/23 12:58:37
file_path_watcher_mac.cc:31 -> FilePathWatcherKQue
dcheng
2016/11/23 14:16:11
I'm wondering more about the Mac-specific bits. It
fdoray
2016/11/23 16:21:41
Three potential solutions:
1. Document that this
Mark Mentovai
2016/11/29 19:00:22
FSEvents are more heavyweight than a kqueue()-base
fdoray
2016/11/29 19:09:47
Then I'll do #1 (document that FilePathWatcher::Wa
|
| // |
| // Recursive watch is not supported on all platforms and file systems. |
| // Watch() will return false in the case of failure. |