CountingSelectEvent class -- calls the user-provided callback (passed to the constructor) when the event is fired from epoll. The trigger() method causes the event to fire. The number of calls to trigger() which occurred before the event fires is counted and passed to the callback.
CountingSelectEvent class -- counts and reports the number of times the trigger() method was called preivous to the event being fired in epoll and the class' handle() method being invoked.
SelectEvent class -- calls the user-provided callback (passed to the constructor) when the event is fired from epoll. The trigger() method causes the event to fire.
Custom event which can be registered with the EpollSelectDispatcher.
An instance of this class can be registered with an EpollSelectDispatcher, and triggered at will, causing it to be selected in the select loop. When it is selected, a user-specified callback (given in the class' constructor) is invoked.
Two versions of the class exist, one which counts the number of calls to trigger() before the callback is invoked (and passes the count to the callback), and one which does not keep a count.
Usage example: