… | |
… | |
11 | ->new |
11 | ->new |
12 | ->require ("MyModule") |
12 | ->require ("MyModule") |
13 | ->AnyEvent::Fork::RPC::run ( |
13 | ->AnyEvent::Fork::RPC::run ( |
14 | "MyModule::server", |
14 | "MyModule::server", |
15 | ); |
15 | ); |
|
|
16 | |
|
|
17 | use AnyEvent; |
16 | |
18 | |
17 | my $cv = AE::cv; |
19 | my $cv = AE::cv; |
18 | |
20 | |
19 | $rpc->(1, 2, 3, sub { |
21 | $rpc->(1, 2, 3, sub { |
20 | print "MyModule::server returned @_\n"; |
22 | print "MyModule::server returned @_\n"; |
… | |
… | |
769 | so you might want to look into L<AnyEvent::FDpasser> which can handle the |
771 | so you might want to look into L<AnyEvent::FDpasser> which can handle the |
770 | gory details. |
772 | gory details. |
771 | |
773 | |
772 | =head1 SEE ALSO |
774 | =head1 SEE ALSO |
773 | |
775 | |
774 | L<AnyEvent::Fork> (to create the processes in the first place), |
776 | L<AnyEvent::Fork>, to create the processes in the first place. |
|
|
777 | |
775 | L<AnyEvent::Fork::Pool> (to manage whole pools of processes). |
778 | L<AnyEvent::Fork::Pool>, to manage whole pools of processes. |
776 | |
779 | |
777 | =head1 AUTHOR AND CONTACT INFORMATION |
780 | =head1 AUTHOR AND CONTACT INFORMATION |
778 | |
781 | |
779 | Marc Lehmann <schmorp@schmorp.de> |
782 | Marc Lehmann <schmorp@schmorp.de> |
780 | http://software.schmorp.de/pkg/AnyEvent-Fork-RPC |
783 | http://software.schmorp.de/pkg/AnyEvent-Fork-RPC |