--- libeio/eio.pod 2011/07/05 16:57:41 1.15 +++ libeio/eio.pod 2011/07/05 17:05:54 1.16 @@ -132,9 +132,9 @@ (i.e. it returns C<-1>) then you should start an idle watcher that calls C until it returns something C. -A full-featured wrapper would look as follows (if C is handling -all requests, it can of course be simplified a lot by removing the idle -watcher logic): +A full-featured conenctor between libeio and libev would look as follows +(if C is handling all requests, it can of course be simplified a +lot by removing the idle watcher logic): static struct ev_loop *loop; static ev_idle repeat_watcher; @@ -180,9 +180,12 @@ loop should be told to wait for read readiness on the read end. In C you would write a single byte, in C you would try to read that byte, and in the callback for the read end, you would call -C. The race is avoided here because the event loop should invoke -your callback again and again until the byte has been read (as the pipe -read callback does not read it, only C). +C. + +You don't have to take special care in the case C doesn't handle +all requests, as the done callback will not be invoked, so the event loop +will still signal readyness for the pipe until I results have been +processed. =head1 HIGH LEVEL REQUEST API