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

Comparing libev/ev.pod (file contents):
Revision 1.114 by root, Mon Dec 31 01:31:30 2007 UTC vs.
Revision 1.116 by root, Mon Dec 31 01:34:09 2007 UTC

590Can be used to make a call to C<ev_loop> return early (but only after it 590Can be used to make a call to C<ev_loop> return early (but only after it
591has processed all outstanding events). The C<how> argument must be either 591has processed all outstanding events). The C<how> argument must be either
592C<EVUNLOOP_ONE>, which will make the innermost C<ev_loop> call return, or 592C<EVUNLOOP_ONE>, which will make the innermost C<ev_loop> call return, or
593C<EVUNLOOP_ALL>, which will make all nested C<ev_loop> calls return. 593C<EVUNLOOP_ALL>, which will make all nested C<ev_loop> calls return.
594 594
595This "unloop state" will be cleared when entering C<ev_loop> again.
596
595=item ev_ref (loop) 597=item ev_ref (loop)
596 598
597=item ev_unref (loop) 599=item ev_unref (loop)
598 600
599Ref/unref can be used to add or remove a reference count on the event 601Ref/unref can be used to add or remove a reference count on the event
603returning, ev_unref() after starting, and ev_ref() before stopping it. For 605returning, ev_unref() after starting, and ev_ref() before stopping it. For
604example, libev itself uses this for its internal signal pipe: It is not 606example, libev itself uses this for its internal signal pipe: It is not
605visible to the libev user and should not keep C<ev_loop> from exiting if 607visible to the libev user and should not keep C<ev_loop> from exiting if
606no event watchers registered by it are active. It is also an excellent 608no event watchers registered by it are active. It is also an excellent
607way to do this for generic recurring timers or from within third-party 609way to do this for generic recurring timers or from within third-party
608libraries. Just remember to I<unref after start> and I<ref before stop>. 610libraries. Just remember to I<unref after start> and I<ref before stop>
611(but only if the watcher wasn't active before, or was active before,
612respectively).
609 613
610Example: Create a signal watcher, but keep it from keeping C<ev_loop> 614Example: Create a signal watcher, but keep it from keeping C<ev_loop>
611running when nothing else is active. 615running when nothing else is active.
612 616
613 struct ev_signal exitsig; 617 struct ev_signal exitsig;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines