--- libev/ev.pod 2019/06/25 05:01:22 1.453 +++ libev/ev.pod 2023/06/03 08:53:03 1.469 @@ -161,9 +161,13 @@ so C will disable this checking): these are programming errors in the libev caller and need to be fixed there. -Libev also has a few internal error-checking Cions, and also has -extensive consistency checking code. These do not trigger under normal -circumstances, as they indicate either a bug in libev or worse. +Via the C macro you can compile in and/or enable extensive +consistency checking code inside libev that can be used to check for +internal inconsistencies, suually caused by application bugs. + +Libev also has a few internal error-checking Cions. These do not +trigger under normal circumstances, as they indicate either a bug in libev +or worse. =head1 GLOBAL FUNCTIONS @@ -478,7 +482,16 @@ It's also required by POSIX in a threaded program, as libev calls C, whose behaviour is officially unspecified. -This flag's behaviour will become the default in future versions of libev. +=item C + +When this flag is specified, the libev will avoid using a C to +detect time jumps. It will still be able to detect time jumps, but takes +longer and has a lower accuracy in doing so, but saves a file descriptor +per loop. + +The current implementation only tries to use a C when the first +C watcher is started and falls back on other methods if it +cannot be created, but this behaviour might change in the future. =item C (value 1, portable select backend) @@ -513,7 +526,7 @@ =item C (value 4, Linux) -Use the linux-specific epoll(7) interface (for both pre- and post-2.6.9 +Use the Linux-specific epoll(7) interface (for both pre- and post-2.6.9 kernels). For few fds, this backend is a bit little slower than poll and select, but @@ -576,14 +589,14 @@ =item C (value 64, Linux) -Use the linux-specific linux aio (I C<< aio(7) >> but C<< +Use the Linux-specific Linux AIO (I C<< aio(7) >> but C<< io_submit(2) >>) event interface available in post-4.18 kernels (but libev only tries to use it in 4.19+). -This is another linux trainwreck of an event interface. +This is another Linux train wreck of an event interface. If this backend works for you (as of this writing, it was very -experimental), it is the best event interface available on linux and might +experimental), it is the best event interface available on Linux and might be well worth enabling it - if it isn't available in your kernel this will be detected and this backend will be skipped. @@ -591,24 +604,24 @@ buffer to receive events. It also doesn't suffer from most of the design problems of epoll (such as not being able to remove event sources from the epoll set), and generally sounds too good to be true. Because, this -being the linux kernel, of course it suffers from a whole new set of +being the Linux kernel, of course it suffers from a whole new set of limitations, forcing you to fall back to epoll, inheriting all its design issues. For one, it is not easily embeddable (but probably could be done using an event fd at some extra overhead). It also is subject to a system wide -limit that can be configured in F. If no aio +limit that can be configured in F. If no AIO requests are left, this backend will be skipped during initialisation, and will switch to epoll when the loop is active. Most problematic in practice, however, is that not all file descriptors -work with it. For example, in linux 5.1, tcp sockets, pipes, event fds, -files, F and a few others are supported, but ttys do not work +work with it. For example, in Linux 5.1, TCP sockets, pipes, event fds, +files, F and many others are supported, but ttys do not work properly (a known bug that the kernel developers don't care about, see L), so this is not (yet?) a generic event polling interface. -Overall, it seems the linux developers just don't want it to have a +Overall, it seems the Linux developers just don't want it to have a generic event handling mechanism other than C