I want to simulate a FAM event. The API doesn’t seem to support this.
Why? Because I have a thread waiting on a FAMNextEvent() and I want to wake it up from another thread.
I guess I could touch one of the files being monitored but that seems very crude.
I want to simulate a FAM event. The API doesn’t seem to support this.
Share
Instead of using
FAMNextEventdirectly, how about usingselectorpollonFAMCONNECTION_GETFD(FAMConnection)When it triggers, check
FAMPendingbefore callingFAMNextEvent.The thread will wait for either a FAM event or a byte written to the self-pipe.