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

Comparing libev/ev.pod (file contents):
Revision 1.335 by root, Mon Oct 25 10:32:05 2010 UTC vs.
Revision 1.337 by root, Sun Oct 31 20:20:20 2010 UTC

463epoll scales either O(1) or O(active_fds). 463epoll scales either O(1) or O(active_fds).
464 464
465The epoll mechanism deserves honorable mention as the most misdesigned 465The epoll mechanism deserves honorable mention as the most misdesigned
466of the more advanced event mechanisms: mere annoyances include silently 466of the more advanced event mechanisms: mere annoyances include silently
467dropping file descriptors, requiring a system call per change per file 467dropping file descriptors, requiring a system call per change per file
468descriptor (and unnecessary guessing of parameters), problems with dup and 468descriptor (and unnecessary guessing of parameters), problems with dup,
469returning before the timeout value requiring additional iterations and so
469so on. The biggest issue is fork races, however - if a program forks then 470on. The biggest issue is fork races, however - if a program forks then
470I<both> parent and child process have to recreate the epoll set, which can 471I<both> parent and child process have to recreate the epoll set, which can
471take considerable time (one syscall per file descriptor) and is of course 472take considerable time (one syscall per file descriptor) and is of course
472hard to detect. 473hard to detect.
473 474
474Epoll is also notoriously buggy - embedding epoll fds I<should> work, but 475Epoll is also notoriously buggy - embedding epoll fds I<should> work, but
823Can be used to make a call to C<ev_run> return early (but only after it 824Can be used to make a call to C<ev_run> return early (but only after it
824has processed all outstanding events). The C<how> argument must be either 825has processed all outstanding events). The C<how> argument must be either
825C<EVBREAK_ONE>, which will make the innermost C<ev_run> call return, or 826C<EVBREAK_ONE>, which will make the innermost C<ev_run> call return, or
826C<EVBREAK_ALL>, which will make all nested C<ev_run> calls return. 827C<EVBREAK_ALL>, which will make all nested C<ev_run> calls return.
827 828
828This "unloop state" will be cleared when entering C<ev_run> again. 829This "break state" will be cleared when entering C<ev_run> again.
829 830
830It is safe to call C<ev_break> from outside any C<ev_run> calls. ##TODO## 831It is safe to call C<ev_break> from outside any C<ev_run> calls, too.
831 832
832=item ev_ref (loop) 833=item ev_ref (loop)
833 834
834=item ev_unref (loop) 835=item ev_unref (loop)
835 836

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines