in reply to Blocking call with time limit ( Linux::Inotify2 )
I'm not sure whether the API for Linux::Inotify2 allows for a timeout.
Before entering into the melee of signals or threads, I would look at the AnyEvent integration of Linux::Inotify2, maybe AnyEvent::Filesys::Notify. Using something like AnyEvent will turn parts of your program inside out, as you will get callbacks instead of actively check on things yourself.
|
|---|