Closed russel closed 6 years ago
I misunderstood, getEvents is a poll.
yeah this is rather meant for game style main loops and not event loops
Sadly I am also finding that it is not reliable at reporting events when using INotify on Debian Sid looking for /dev/dvb tree events. I have DInotify working fine, albeit in an overcomplicated way that I shall now simplify, but was looking to replace with something cross platform analogous to Rust's Notify, and then get stuff working properly on OSX/macOS. However, I think I'll have to go back to the DInotify solution rewritten, at least for now.
If it is then doesn't there need to be a version with a timeout?
If I have a thread running a watcher and getEvents() blocks, then it is not possible to terminate the thread and so terminate the application.
DInotify added the read(Duration) function to deal with this.