… | |
… | |
530 | =back |
530 | =back |
531 | |
531 | |
532 | =head1 THREADS |
532 | =head1 THREADS |
533 | |
533 | |
534 | Threads are not supported by this module in any way. Perl pseudo-threads |
534 | Threads are not supported by this module in any way. Perl pseudo-threads |
535 | is evil stuff and must die. |
535 | is evil stuff and must die. As soon as Perl gains real threads I will work |
|
|
536 | on thread support for it. |
|
|
537 | |
|
|
538 | =head1 FORK |
|
|
539 | |
|
|
540 | Most of the "improved" event delivering mechanisms of modern operating |
|
|
541 | systems have quite a few problems with fork(2) (to put it bluntly: it is |
|
|
542 | not supported and usually destructive). Libev makes it possible to work |
|
|
543 | around this by having a function that recreates the kernel state after |
|
|
544 | fork in the child. |
|
|
545 | |
|
|
546 | On non-win32 platforms, this module requires the pthread_atfork |
|
|
547 | functionality to do this automatically for you. This function is quite |
|
|
548 | buggy on most BSDs, though, so YMMV. The overhead for this is quite |
|
|
549 | negligible, because everything the function currently does is set a flag |
|
|
550 | that is checked only when the event loop gets used the next time, so when |
|
|
551 | you do fork but not use EV, the overhead is minimal. |
|
|
552 | |
|
|
553 | On win32, there is no notion of fork so all this doesn't apply, of course. |
536 | |
554 | |
537 | =cut |
555 | =cut |
538 | |
556 | |
539 | our $DIED = sub { |
557 | our $DIED = sub { |
540 | warn "EV: error in callback (ignoring): $@"; |
558 | warn "EV: error in callback (ignoring): $@"; |