ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.pod
(Generate patch)

Comparing libev/ev.pod (file contents):
Revision 1.275 by root, Sat Dec 26 09:21:54 2009 UTC vs.
Revision 1.276 by root, Tue Dec 29 13:11:00 2009 UTC

792 792
793Ref/unref can be used to add or remove a reference count on the event 793Ref/unref can be used to add or remove a reference count on the event
794loop: Every watcher keeps one reference, and as long as the reference 794loop: Every watcher keeps one reference, and as long as the reference
795count is nonzero, C<ev_loop> will not return on its own. 795count is nonzero, C<ev_loop> will not return on its own.
796 796
797If you have a watcher you never unregister that should not keep C<ev_loop> 797This is useful when you have a watcher that you never intend to
798from returning, call ev_unref() after starting, and ev_ref() before 798unregister, but that nevertheless should not keep C<ev_loop> from
799returning. In such a case, call C<ev_unref> after starting, and C<ev_ref>
799stopping it. 800before stopping it.
800 801
801As an example, libev itself uses this for its internal signal pipe: It 802As an example, libev itself uses this for its internal signal pipe: It
802is not visible to the libev user and should not keep C<ev_loop> from 803is not visible to the libev user and should not keep C<ev_loop> from
803exiting if no event watchers registered by it are active. It is also an 804exiting if no event watchers registered by it are active. It is also an
804excellent way to do this for generic recurring timers or from within 805excellent way to do this for generic recurring timers or from within

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines