From eb0bc6d98333434ecec2c4e7f7292506667d9141 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 15 Apr 2009 17:49:26 +0000 Subject: keepalive fix --- ev.pod | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'ev.pod') diff --git a/ev.pod b/ev.pod index 751c909..ff1c29f 100644 --- a/ev.pod +++ b/ev.pod @@ -728,13 +728,15 @@ If you have a watcher you never unregister that should not keep C 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 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 and I -(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 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 and I (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 +in the callback). Example: Create a signal watcher, but keep it from keeping C running when nothing else is active. @@ -928,6 +930,11 @@ C). The given async watcher has been asynchronously notified (see C). +=item C + +Not ever sent (or otherwise used) by libev itself, but can be freely used +by libev users to signal watchers (e.g. via C). + =item C An unspecified error has occurred, the watcher has been stopped. This might -- cgit v1.2.3