Browse Source

*** empty log message ***

master
Marc Alexander Lehmann 4 years ago
parent
commit
2ca2d39af7
  1. 7
      ev.pod

7
ev.pod

@ -413,9 +413,10 @@ make libev check for a fork in each iteration by enabling this flag.
This works by calling C<getpid ()> on every iteration of the loop,
and thus this might slow down your event loop if you do a lot of loop
iterations and little real work, but is usually not noticeable (on my
GNU/Linux system for example, C<getpid> is actually a simple 5-insn sequence
without a system call and thus I<very> fast, but my GNU/Linux system also has
C<pthread_atfork> which is even faster).
GNU/Linux system for example, C<getpid> is actually a simple 5-insn
sequence without a system call and thus I<very> fast, but my GNU/Linux
system also has C<pthread_atfork> which is even faster). (Update: glibc
versions 2.25 apparently removed the C<getpid> optimisation again).
The big advantage of this flag is that you can forget about fork (and
forget about forgetting to tell libev about forking, although you still

Loading…
Cancel
Save