-
-
Notifications
You must be signed in to change notification settings - Fork 704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
InotifyEmitter thread fails to stop #250
Comments
No that's how it's stopped. close interrupts the read. However, there is a know issue when all directories are deleted before inotify is closed. (see |
That was clearer, yes. Merged. Thanks! |
CCP-Aporia
pushed a commit
to CCP-Aporia/watchdog
that referenced
this issue
Aug 13, 2020
Fix inotify stop dead lock. Closes gorakhargosh#250
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have the following code on Linux with InotifyEmitter https://gist.github.com/adiroiban/064b3a5e07d404ea7109
in order to integrate watchdog with my unit test, I need each test to clean the set of thread it uses and leave the main process clean.
my problem is that inotify thread does not stop... and I have no idea why
I have investigate the code, and the problem is in EventEmitter.run + InotifyEmitter.queue_events combined with InotifyEmitter.on_thread_stop:
The InotifyEmitter.run() method is blocked in InotifyEmitter.queue_events with self._inotify.read_event() ... but then InotifyEmitter.on_thread_stop just closes the self._inotify without emitting some event to unlock the wait in read_event() and push the run() method to a stop.
I will push a fix to be reviewed
thanks!
The text was updated successfully, but these errors were encountered: