… | |
… | |
274 | a fork, you can also make libev check for a fork in each iteration by |
274 | a fork, you can also make libev check for a fork in each iteration by |
275 | enabling this flag. |
275 | enabling this flag. |
276 | |
276 | |
277 | This works by calling C<getpid ()> on every iteration of the loop, |
277 | This works by calling C<getpid ()> on every iteration of the loop, |
278 | and thus this might slow down your event loop if you do a lot of loop |
278 | and thus this might slow down your event loop if you do a lot of loop |
279 | iterations and little real work, but is usually not noticable (on my |
279 | iterations and little real work, but is usually not noticeable (on my |
280 | Linux system for example, C<getpid> is actually a simple 5-insn sequence |
280 | Linux system for example, C<getpid> is actually a simple 5-insn sequence |
281 | without a syscall and thus I<very> fast, but my Linux system also has |
281 | without a syscall and thus I<very> fast, but my Linux system also has |
282 | C<pthread_atfork> which is even faster). |
282 | C<pthread_atfork> which is even faster). |
283 | |
283 | |
284 | The big advantage of this flag is that you can forget about fork (and |
284 | The big advantage of this flag is that you can forget about fork (and |