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

Comparing libev/ev.pod (file contents):
Revision 1.64 by root, Sat Dec 1 15:32:53 2007 UTC vs.
Revision 1.66 by root, Mon Dec 3 13:41:25 2007 UTC

274a fork, you can also make libev check for a fork in each iteration by 274a fork, you can also make libev check for a fork in each iteration by
275enabling this flag. 275enabling this flag.
276 276
277This works by calling C<getpid ()> on every iteration of the loop, 277This works by calling C<getpid ()> on every iteration of the loop,
278and thus this might slow down your event loop if you do a lot of loop 278and thus this might slow down your event loop if you do a lot of loop
279iterations and little real work, but is usually not noticable (on my 279iterations and little real work, but is usually not noticeable (on my
280Linux system for example, C<getpid> is actually a simple 5-insn sequence 280Linux system for example, C<getpid> is actually a simple 5-insn sequence
281without a syscall and thus I<very> fast, but my Linux system also has 281without a syscall and thus I<very> fast, but my Linux system also has
282C<pthread_atfork> which is even faster). 282C<pthread_atfork> which is even faster).
283 283
284The big advantage of this flag is that you can forget about fork (and 284The big advantage of this flag is that you can forget about fork (and
429=item ev_loop_fork (loop) 429=item ev_loop_fork (loop)
430 430
431Like C<ev_default_fork>, but acts on an event loop created by 431Like C<ev_default_fork>, but acts on an event loop created by
432C<ev_loop_new>. Yes, you have to call this on every allocated event loop 432C<ev_loop_new>. Yes, you have to call this on every allocated event loop
433after fork, and how you do this is entirely your own problem. 433after fork, and how you do this is entirely your own problem.
434
435=item unsigned int ev_loop_count (loop)
436
437Returns the count of loop iterations for the loop, which is identical to
438the number of times libev did poll for new events. It starts at C<0> and
439happily wraps around with enough iterations.
440
441This value can sometimes be useful as a generation counter of sorts (it
442"ticks" the number of loop iterations), as it roughly corresponds with
443C<ev_prepare> and C<ev_check> calls.
434 444
435=item unsigned int ev_backend (loop) 445=item unsigned int ev_backend (loop)
436 446
437Returns one of the C<EVBACKEND_*> flags indicating the event backend in 447Returns one of the C<EVBACKEND_*> flags indicating the event backend in
438use. 448use.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines