… | |
… | |
969 | |
969 | |
970 | ev_io_start (EV_DEFAULT_UC, &w); |
970 | ev_io_start (EV_DEFAULT_UC, &w); |
971 | |
971 | |
972 | =item C<ev_TYPE_stop> (loop *, ev_TYPE *watcher) |
972 | =item C<ev_TYPE_stop> (loop *, ev_TYPE *watcher) |
973 | |
973 | |
974 | Stops the given watcher again (if active) and clears the pending |
974 | Stops the given watcher if active, and clears the pending status (whether |
|
|
975 | the watcher was active or not). |
|
|
976 | |
975 | status. It is possible that stopped watchers are pending (for example, |
977 | It is possible that stopped watchers are pending - for example, |
976 | non-repeating timers are being stopped when they become pending), but |
978 | non-repeating timers are being stopped when they become pending - but |
977 | C<ev_TYPE_stop> ensures that the watcher is neither active nor pending. If |
979 | calling C<ev_TYPE_stop> ensures that the watcher is neither active nor |
978 | you want to free or reuse the memory used by the watcher it is therefore a |
980 | pending. If you want to free or reuse the memory used by the watcher it is |
979 | good idea to always call its C<ev_TYPE_stop> function. |
981 | therefore a good idea to always call its C<ev_TYPE_stop> function. |
980 | |
982 | |
981 | =item bool ev_is_active (ev_TYPE *watcher) |
983 | =item bool ev_is_active (ev_TYPE *watcher) |
982 | |
984 | |
983 | Returns a true value iff the watcher is active (i.e. it has been started |
985 | Returns a true value iff the watcher is active (i.e. it has been started |
984 | and not yet been stopped). As long as a watcher is active you must not modify |
986 | and not yet been stopped). As long as a watcher is active you must not modify |
… | |
… | |
1794 | to exchange stat structures with application programs compiled using the |
1796 | to exchange stat structures with application programs compiled using the |
1795 | default compilation environment. |
1797 | default compilation environment. |
1796 | |
1798 | |
1797 | =head3 Inotify and Kqueue |
1799 | =head3 Inotify and Kqueue |
1798 | |
1800 | |
1799 | When C<inotify (7)> support has been compiled into libev (generally only |
1801 | When C<inotify (7)> support has been compiled into libev (generally |
|
|
1802 | only available with Linux 2.6.25 or above due to bugs in earlier |
1800 | available with Linux) and present at runtime, it will be used to speed up |
1803 | implementations) and present at runtime, it will be used to speed up |
1801 | change detection where possible. The inotify descriptor will be created lazily |
1804 | change detection where possible. The inotify descriptor will be created |
1802 | when the first C<ev_stat> watcher is being started. |
1805 | lazily when the first C<ev_stat> watcher is being started. |
1803 | |
1806 | |
1804 | Inotify presence does not change the semantics of C<ev_stat> watchers |
1807 | Inotify presence does not change the semantics of C<ev_stat> watchers |
1805 | except that changes might be detected earlier, and in some cases, to avoid |
1808 | except that changes might be detected earlier, and in some cases, to avoid |
1806 | making regular C<stat> calls. Even in the presence of inotify support |
1809 | making regular C<stat> calls. Even in the presence of inotify support |
1807 | there are many cases where libev has to resort to regular C<stat> polling, |
1810 | there are many cases where libev has to resort to regular C<stat> polling, |