… | |
… | |
747 | |
747 | |
748 | See "poll_cb" for an example. |
748 | See "poll_cb" for an example. |
749 | |
749 | |
750 | IO::AIO::poll_cb |
750 | IO::AIO::poll_cb |
751 | Process some outstanding events on the result pipe. You have to call |
751 | Process some outstanding events on the result pipe. You have to call |
752 | this regularly. Returns the number of events processed. Returns |
752 | this regularly. Returns 0 if all events could be processed, or -1 if |
753 | immediately when no events are outstanding. The amount of events |
753 | it returned earlier for whatever reason. Returns immediately when no |
|
|
754 | events are outstanding. The amount of events processed depends on |
754 | processed depends on the settings of "IO::AIO::max_poll_req" and |
755 | the settings of "IO::AIO::max_poll_req" and |
755 | "IO::AIO::max_poll_time". |
756 | "IO::AIO::max_poll_time". |
756 | |
757 | |
757 | If not all requests were processed for whatever reason, the |
758 | If not all requests were processed for whatever reason, the |
758 | filehandle will still be ready when "poll_cb" returns. |
759 | filehandle will still be ready when "poll_cb" returns, so normally |
|
|
760 | you don't have to do anything special to have it called later. |
759 | |
761 | |
760 | Example: Install an Event watcher that automatically calls |
762 | Example: Install an Event watcher that automatically calls |
761 | IO::AIO::poll_cb with high priority: |
763 | IO::AIO::poll_cb with high priority: |
762 | |
764 | |
763 | Event->io (fd => IO::AIO::poll_fileno, |
765 | Event->io (fd => IO::AIO::poll_fileno, |