X-Git-Url: https://git.llucax.com/software/libev.git/blobdiff_plain/9df49634f11f561ad9b5669124a4f2bd7179a559..363b337b90b2575d2cc5253af2ffe6afa0d3eb72:/ev.pod?ds=inline diff --git a/ev.pod b/ev.pod index 0657b7f..ab57ffb 100644 --- a/ev.pod +++ b/ev.pod @@ -119,14 +119,14 @@ you actually want to know. =item int ev_version_minor () -You can find out the major and minor API/ABI version numbers of the library +You can find out the major and minor ABI version numbers of the library you linked against by calling the functions C and C. If you want, you can compare against the global symbols C and C, which specify the version of the library your program was compiled against. -These version numbers refer to the API and ABI version of the library, not -the release version. +These version numbers refer to the ABI version of the library, not the +release version. Usually, it's a good idea to terminate if the major versions mismatch, as this indicates an incompatible change. Minor versions are usually @@ -913,6 +913,28 @@ whether a file descriptor is really ready with a known-to-be good interface such as poll (fortunately in our Xlib example, Xlib already does this on its own, so its quite safe to use). +=head3 The special problem of disappearing file descriptors + +Some backends (e.g kqueue, epoll) need to be told about closing a file +descriptor (either by calling C explicitly or by any other means, +such as C). The reason is that you register interest in some file +descriptor, but when it goes away, the operating system will silently drop +this interest. If another file descriptor with the same number then is +registered with libev, there is no efficient way to see that this is, in +fact, a different file descriptor. + +To avoid having to explicitly tell libev about such cases, libev follows +the following policy: Each time C is being called, libev +will assume that this is potentially a new file descriptor, otherwise +it is assumed that the file descriptor stays the same. That means that +you I to call C (or C) when you change the +descriptor even if the file descriptor number itself did not change. + +This is how one would do it normally anyway, the important point is that +the libev application should not optimise around libev but should leave +optimisations to libev. + + =over 4 =item ev_io_init (ev_io *, callback, int fd, int events)