… | |
… | |
1958 | |
1958 | |
1959 | If you ask a timer to call your callback after three seconds, then |
1959 | If you ask a timer to call your callback after three seconds, then |
1960 | you expect it to be invoked after three seconds - but of course, this |
1960 | you expect it to be invoked after three seconds - but of course, this |
1961 | cannot be guaranteed to infinite precision. Less obviously, it cannot be |
1961 | cannot be guaranteed to infinite precision. Less obviously, it cannot be |
1962 | guaranteed to any precision by libev - imagine somebody suspending the |
1962 | guaranteed to any precision by libev - imagine somebody suspending the |
1963 | process a STOP signal for a few hours for example. |
1963 | process with a STOP signal for a few hours for example. |
1964 | |
1964 | |
1965 | So, libev tries to invoke your callback as soon as possible I<after> the |
1965 | So, libev tries to invoke your callback as soon as possible I<after> the |
1966 | delay has occurred, but cannot guarantee this. |
1966 | delay has occurred, but cannot guarantee this. |
1967 | |
1967 | |
1968 | A less obvious failure mode is calling your callback too early: many event |
1968 | A less obvious failure mode is calling your callback too early: many event |
… | |
… | |
3473 | ev_once (STDIN_FILENO, EV_READ, 10., stdin_ready, 0); |
3473 | ev_once (STDIN_FILENO, EV_READ, 10., stdin_ready, 0); |
3474 | |
3474 | |
3475 | =item ev_feed_fd_event (loop, int fd, int revents) |
3475 | =item ev_feed_fd_event (loop, int fd, int revents) |
3476 | |
3476 | |
3477 | Feed an event on the given fd, as if a file descriptor backend detected |
3477 | Feed an event on the given fd, as if a file descriptor backend detected |
3478 | the given events it. |
3478 | the given events. |
3479 | |
3479 | |
3480 | =item ev_feed_signal_event (loop, int signum) |
3480 | =item ev_feed_signal_event (loop, int signum) |
3481 | |
3481 | |
3482 | Feed an event as if the given signal occurred. See also C<ev_feed_signal>, |
3482 | Feed an event as if the given signal occurred. See also C<ev_feed_signal>, |
3483 | which is async-safe. |
3483 | which is async-safe. |