… | |
… | |
685 | C<EVUNLOOP_ONE>, which will make the innermost C<ev_loop> call return, or |
685 | C<EVUNLOOP_ONE>, which will make the innermost C<ev_loop> call return, or |
686 | C<EVUNLOOP_ALL>, which will make all nested C<ev_loop> calls return. |
686 | C<EVUNLOOP_ALL>, which will make all nested C<ev_loop> calls return. |
687 | |
687 | |
688 | This "unloop state" will be cleared when entering C<ev_loop> again. |
688 | This "unloop state" will be cleared when entering C<ev_loop> again. |
689 | |
689 | |
|
|
690 | It is safe to call C<ev_unloop> from otuside any C<ev_loop> calls. |
|
|
691 | |
690 | =item ev_ref (loop) |
692 | =item ev_ref (loop) |
691 | |
693 | |
692 | =item ev_unref (loop) |
694 | =item ev_unref (loop) |
693 | |
695 | |
694 | Ref/unref can be used to add or remove a reference count on the event |
696 | Ref/unref can be used to add or remove a reference count on the event |
… | |
… | |
967 | |
969 | |
968 | ev_io_start (EV_DEFAULT_UC, &w); |
970 | ev_io_start (EV_DEFAULT_UC, &w); |
969 | |
971 | |
970 | =item C<ev_TYPE_stop> (loop *, ev_TYPE *watcher) |
972 | =item C<ev_TYPE_stop> (loop *, ev_TYPE *watcher) |
971 | |
973 | |
972 | 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 | |
973 | status. It is possible that stopped watchers are pending (for example, |
977 | It is possible that stopped watchers are pending - for example, |
974 | non-repeating timers are being stopped when they become pending), but |
978 | non-repeating timers are being stopped when they become pending - but |
975 | 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 |
976 | 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 |
977 | 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. |
978 | |
982 | |
979 | =item bool ev_is_active (ev_TYPE *watcher) |
983 | =item bool ev_is_active (ev_TYPE *watcher) |
980 | |
984 | |
981 | 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 |
982 | 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 |