ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/cvsroot/AnyEvent-Fork/Fork.pm
(Generate patch)

Comparing cvsroot/AnyEvent-Fork/Fork.pm (file contents):
Revision 1.64 by root, Wed Nov 26 13:37:40 2014 UTC vs.
Revision 1.65 by root, Sat Jun 20 13:16:50 2015 UTC

200 200
201 sub worker { 201 sub worker {
202 my ($slave_filehandle) = @_; 202 my ($slave_filehandle) = @_;
203 203
204 # now $slave_filehandle is connected to the $master_filehandle 204 # now $slave_filehandle is connected to the $master_filehandle
205 # in the original prorcess. have fun! 205 # in the original process. have fun!
206 } 206 }
207 207
208=head2 Create a pool of server processes all accepting on the same socket. 208=head2 Create a pool of server processes all accepting on the same socket.
209 209
210 # create listener socket 210 # create listener socket
720C<send_xxx> methods, such as file handles. See the L<use AnyEvent::Fork as 720C<send_xxx> methods, such as file handles. See the L<use AnyEvent::Fork as
721a faster fork+exec> example to see it in action. 721a faster fork+exec> example to see it in action.
722 722
723Returns the process object for easy chaining of method calls. 723Returns the process object for easy chaining of method calls.
724 724
725It's common to want to call an iniitalisation function with some
726arguments. Make sure you actually pass C<@_> to that function (for example
727by using C<&name> syntax), and do not just specify a function name:
728
729 $proc->eval ('&MyModule::init', $string1, $string2);
730
725=cut 731=cut
726 732
727sub eval { 733sub eval {
728 my ($self, $code, @args) = @_; 734 my ($self, $code, @args) = @_;
729 735

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines