… | |
… | |
753 | The C<fork_ns> variant doesn't start (activate) the newly created watcher. |
753 | The C<fork_ns> variant doesn't start (activate) the newly created watcher. |
754 | |
754 | |
755 | =back |
755 | =back |
756 | |
756 | |
757 | |
757 | |
|
|
758 | =head1 PERL SIGNALS |
|
|
759 | |
|
|
760 | While Perl signal handling (C<%SIG>) is not affected by EV, the behaviour |
|
|
761 | with EV is as the same as any other C library: Perl-signals will only be |
|
|
762 | handled when Perl runs, which means your signal handler might be invoked |
|
|
763 | only the next time an event callback is invoked. |
|
|
764 | |
|
|
765 | The solution is to use EV signal watchers (see C<EV::signal>), which will |
|
|
766 | ensure proper operations with regards to other event watchers. |
|
|
767 | |
|
|
768 | If you cannot do this for whatever reason, you can also force a watcher |
|
|
769 | to be called on every event loop iteration by installing a C<EV::check> |
|
|
770 | watcher: |
|
|
771 | |
|
|
772 | my $async_check = EV::check sub { }; |
|
|
773 | |
|
|
774 | This ensures that perl shortly gets into control for a short time, and |
|
|
775 | also ensures slower overall operation. |
|
|
776 | |
758 | =head1 THREADS |
777 | =head1 THREADS |
759 | |
778 | |
760 | Threads are not supported by this module in any way. Perl pseudo-threads |
779 | Threads are not supported by this module in any way. Perl pseudo-threads |
761 | is evil stuff and must die. As soon as Perl gains real threads I will work |
780 | is evil stuff and must die. As soon as Perl gains real threads I will work |
762 | on thread support for it. |
781 | on thread support for it. |