in reply to Re^2: Interrupting a blocking read (Linux::Inotify2) with a signal handler within a thread
in thread Interrupting a blocking read (Linux::Inotify2) with a signal handler within a thread
Then your simplest, best (and probably only) solution would be to switch the notify and processing threads around.
That is, put the event processing into the worker thread and run the Inotify in the main thread.
That makes more sense anyway as the Inotify only has to queue the events, but if the event are occurring rapidly, a single processing thread might not be able to keep up. By placing the processing in a worker thread, you can start 2 or 3 or as many as are needed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Interrupting a blocking read (Linux::Inotify2) with a signal handler within a thread
by clueless newbie (Curate) on Sep 10, 2011 at 20:40 UTC | |
by BrowserUk (Patriarch) on Sep 10, 2011 at 20:53 UTC | |
by clueless newbie (Curate) on Sep 10, 2011 at 21:03 UTC |