howeyc / fsnotify

File system notification for Go
BSD 3-Clause "New" or "Revised" License
1.99k stars 252 forks source link

watcher.Watch() blocks on Windws #90

Closed elgs closed 10 years ago

elgs commented 10 years ago

I implemented a recursive file watch using fsnotify. When I'm trying to watch some deep directory structures, the watcher.Watch() almost always block on Windows.

nathany commented 10 years ago

Oh :-(

Please be aware of the moving notice: https://github.com/howeyc/fsnotify/blob/master/CONTRIBUTING.md

@howeyc Shall I add this notice to the README as well?

elgs commented 10 years ago

It's my fault. I tried to watch all the directories before launching the goroutine to process the events. While I was adding new directories to watch, I recorded the directory structure to a data file. When the writing to the data file triggered about ~20-30 events, it blocked. This time the event processing goroutines has not been launched, yet.

howeyc commented 10 years ago

@nathany Yes, I think adding a notice to the README would be helpful.