--- libeio/eio.pod 2011/07/05 18:59:28 1.17 +++ libeio/eio.pod 2011/07/05 20:34:42 1.18 @@ -185,7 +185,7 @@ 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 +will still signal readiness for the pipe until I results have been processed. @@ -263,7 +263,7 @@ /* the first three arguments are passed to open(2) */ /* the remaining are priority, callback and data */ if (!eio_open ("/etc/passwd", O_RDONLY, 0, 0, file_open_done, 0)) - abort (); /* something ent wrong, we will all die!!! */ + abort (); /* something went wrong, we will all die!!! */ Note that you additionally need to call C when the C indicates that requests are ready to be processed. @@ -271,16 +271,16 @@ =head2 CANCELLING REQUESTS Sometimes the need for a request goes away before the request is -finished. In that case, one can cancel the reqiest by a call to +finished. In that case, one can cancel the request by a call to C: =over 4 =item eio_cancel (eio_req *req) -Cancel the request. If the request is currently executing it might still -continue to execute, and in other cases it might still take a while till -the request is cancelled. +Cancel the request (and all it's subrequests). If the request is currently +executing it might still continue to execute, and in other cases it might +still take a while till the request is cancelled. Even if cancelled, the finish callback will still be invoked - the callbacks of all cancellable requests need to check whether the request @@ -293,10 +293,13 @@ return 0; } -In addition, cancelled requests will either have C<< req->result >> set to -C<-1> and C to C, or otherwise they were successfully -executed despite being cancelled (e.g. when they have already been -executed at the time they were cancelled). +In addition, cancelled requests will I have C<< req->result >> +set to C<-1> and C to C, or I they were +successfully executed, despite being cancelled (e.g. when they have +already been executed at the time they were cancelled). + +C is still true for requests that have successfully +executed, as long as C was called on them at some point. =back @@ -433,8 +436,8 @@ =head3 READING DIRECTORIES Reading directories sounds simple, but can be rather demanding, especially -if you want to do stuff such as traversing a diretcory hierarchy or -processing all files in a directory. Libeio can assist thess complex tasks +if you want to do stuff such as traversing a directory hierarchy or +processing all files in a directory. Libeio can assist these complex tasks with it's C call. =over 4 @@ -536,15 +539,15 @@ all files in the given directory, then the returned order will likely be fastest. -If both this flag and C are specified, then -the likely dirs come first, resulting in a less optimal stat order. +If both this flag and C are specified, then the +likely directories come first, resulting in a less optimal stat order. =item EIO_READDIR_FOUND_UNKNOWN This flag should not be specified when calling C. Instead, it is being set by C (you can access the C via C<< req->int1 >>, when any of the C's found were C. The -absense of this flag therefore indicates that all C's are known, +absence of this flag therefore indicates that all C's are known, which can be used to speed up some algorithms. A typical use case would be to identify all subdirectories within a @@ -642,7 +645,7 @@ =item eio_busy (eio_tstamp delay, int pri, eio_cb cb, void *data) -This is a a request that takes C seconds to execute, but otherwise +This is a request that takes C seconds to execute, but otherwise does nothing - it simply puts one of the worker threads to sleep for this long. @@ -668,8 +671,9 @@ cancel the whole request with its subrequests and b) limiting the number of "active" requests. -Further below you will find more dicussion of these topics - first follows -the reference section detailing the request generator and other methods. +Further below you will find more discussion of these topics - first +follows the reference section detailing the request generator and other +methods. =over 4 @@ -750,14 +754,18 @@ Note that: -a) libeio doesn't know how long your request callbacks take, so the time -spent in C is up to one callback invocation longer then this -interval. +=over 4 + +=item a) libeio doesn't know how long your request callbacks take, so the +time spent in C is up to one callback invocation longer then +this interval. -b) this is implemented by calling C after each request, -which can be costly. +=item b) this is implemented by calling C after each +request, which can be costly. -c) at least one request will be handled. +=item c) at least one request will be handled. + +=back =item eio_set_max_poll_reqs (unsigned int nreqs)