ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libeio/eio.pod
(Generate patch)

Comparing libeio/eio.pod (file contents):
Revision 1.33 by root, Thu Jan 24 06:26:18 2013 UTC vs.
Revision 1.35 by root, Mon Aug 18 08:11:54 2014 UTC

176 { 176 {
177 loop = EV_DEFAULT; 177 loop = EV_DEFAULT;
178 178
179 ev_idle_init (&repeat_watcher, repeat); 179 ev_idle_init (&repeat_watcher, repeat);
180 ev_async_init (&ready_watcher, ready); 180 ev_async_init (&ready_watcher, ready);
181 ev_async_start (loop &watcher); 181 ev_async_start (loop, &watcher);
182 182
183 eio_init (want_poll, 0); 183 eio_init (want_poll, 0);
184 } 184 }
185 185
186For most other event loops, you would typically use a pipe - the event 186For most other event loops, you would typically use a pipe - the event
290 290
291Cancel the request (and all its subrequests). If the request is currently 291Cancel the request (and all its subrequests). If the request is currently
292executing it might still continue to execute, and in other cases it might 292executing it might still continue to execute, and in other cases it might
293still take a while till the request is cancelled. 293still take a while till the request is cancelled.
294 294
295Even if cancelled, the finish callback will still be invoked - the 295When cancelled, the finish callback will not be invoked.
296callbacks of all cancellable requests need to check whether the request
297has been cancelled by calling C<EIO_CANCELLED (req)>:
298
299 static int
300 my_eio_cb (eio_req *req)
301 {
302 if (EIO_CANCELLED (req))
303 return 0;
304 }
305
306In addition, cancelled requests will I<either> have C<< req->result >>
307set to C<-1> and C<errno> to C<ECANCELED>, or I<otherwise> they were
308successfully executed, despite being cancelled (e.g. when they have
309already been executed at the time they were cancelled).
310 296
311C<EIO_CANCELLED> is still true for requests that have successfully 297C<EIO_CANCELLED> is still true for requests that have successfully
312executed, as long as C<eio_cancel> was called on them at some point. 298executed, as long as C<eio_cancel> was called on them at some point.
313 299
314=back 300=back

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines