diff options
Diffstat (limited to 'ev.pod')
-rw-r--r-- | ev.pod | 21 |
1 files changed, 14 insertions, 7 deletions
@@ -728,13 +728,15 @@ If you have a watcher you never unregister that should not keep C<ev_loop> from returning, call ev_unref() after starting, and ev_ref() before stopping it. -As an example, libev itself uses this for its internal signal pipe: It is -not visible to the libev user and should not keep C<ev_loop> from exiting -if no event watchers registered by it are active. It is also an excellent -way to do this for generic recurring timers or from within third-party -libraries. Just remember to I<unref after start> and I<ref before stop> -(but only if the watcher wasn't active before, or was active before, -respectively). +As an example, libev itself uses this for its internal signal pipe: It +is not visible to the libev user and should not keep C<ev_loop> from +exiting if no event watchers registered by it are active. It is also an +excellent way to do this for generic recurring timers or from within +third-party libraries. Just remember to I<unref after start> and I<ref +before stop> (but only if the watcher wasn't active before, or was active +before, respectively. Note also that libev might stop watchers itself +(e.g. non-repeating timers) in which case you have to C<ev_ref> +in the callback). Example: Create a signal watcher, but keep it from keeping C<ev_loop> running when nothing else is active. @@ -928,6 +930,11 @@ C<ev_fork>). The given async watcher has been asynchronously notified (see C<ev_async>). +=item C<EV_CUSTOM> + +Not ever sent (or otherwise used) by libev itself, but can be freely used +by libev users to signal watchers (e.g. via C<ev_feed_event>). + =item C<EV_ERROR> An unspecified error has occurred, the watcher has been stopped. This might |