… | |
… | |
104 | This callback is invoked when libeio detects that all pending requests |
104 | This callback is invoked when libeio detects that all pending requests |
105 | have been handled. It is "edge-triggered", that is, it will only be |
105 | have been handled. It is "edge-triggered", that is, it will only be |
106 | called once after C<want_poll>. To put it differently, C<want_poll> and |
106 | called once after C<want_poll>. To put it differently, C<want_poll> and |
107 | C<done_poll> are invoked in pairs: after C<want_poll> you have to call |
107 | C<done_poll> are invoked in pairs: after C<want_poll> you have to call |
108 | C<eio_poll ()> until either C<eio_poll> indicates that everything has been |
108 | C<eio_poll ()> until either C<eio_poll> indicates that everything has been |
109 | handled or C<done_poll> has been called, which signals the same. |
109 | handled or C<done_poll> has been called, which signals the same - only one |
|
|
110 | method is needed. |
110 | |
111 | |
111 | Note that C<eio_poll> might return after C<done_poll> and C<want_poll> |
112 | Note that C<eio_poll> might return after C<done_poll> and C<want_poll> |
112 | have been called again, so watch out for races in your code. |
113 | have been called again, so watch out for races in your code. |
113 | |
114 | |
|
|
115 | It is quite common to have an empty C<done_call> callback and only use |
|
|
116 | the return value from C<eio_poll>, or, when C<eio_poll> is configured to |
|
|
117 | handle all outstanding replies, it's enough to call C<eio_poll> once. |
|
|
118 | |
114 | As with C<want_poll>, this callback is called while locks are being held, |
119 | As with C<want_poll>, this callback is called while locks are being held, |
115 | so you I<must not call any libeio functions form within this callback>. |
120 | so you I<must not call any libeio functions from within this callback>. |
116 | |
121 | |
117 | =item int eio_poll () |
122 | =item int eio_poll () |
118 | |
123 | |
119 | This function has to be called whenever there are pending requests that |
124 | This function has to be called whenever there are pending requests that |
120 | need finishing. You usually call this after C<want_poll> has indicated |
125 | need finishing. You usually call this after C<want_poll> has indicated |