I'd like to incorporate inotifiers into an application that has its own event loop based on Kernel.select. The #to_io method is great as far as it goes in that I can tell when new inotify events have been sent by the system, but to retrieve and parse them involves a dance with callbacks: I'd have to write a callback which saves them somewhere, call #process to call it, and then inspect the saved events when control returns from #process to my own code again.
It would be much cleaner if I could just call #get_events directly, but at present that seems to be an internal-use-only method. Would you consider making it or something very like it part of the official interface?
I'd like to incorporate inotifiers into an application that has its own event loop based on Kernel.select. The #to_io method is great as far as it goes in that I can tell when new inotify events have been sent by the system, but to retrieve and parse them involves a dance with callbacks: I'd have to write a callback which saves them somewhere, call #process to call it, and then inspect the saved events when control returns from #process to my own code again.
It would be much cleaner if I could just call #get_events directly, but at present that seems to be an internal-use-only method. Would you consider making it or something very like it part of the official interface?