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

Comparing AnyEvent-Fork/Fork.pm (file contents):
Revision 1.28 by root, Sat Apr 6 09:06:43 2013 UTC vs.
Revision 1.29 by root, Sat Apr 6 09:15:49 2013 UTC

325usually return the process object, so you can chain method calls. 325usually return the process object, so you can chain method calls.
326 326
327If a process object is destroyed before calling its C<run> method, then 327If a process object is destroyed before calling its C<run> method, then
328the process simply exits. After C<run> is called, all responsibility is 328the process simply exits. After C<run> is called, all responsibility is
329passed to the specified function. 329passed to the specified function.
330
331As long as there is any outstanding work to be done, process objects
332resist being destroyed, so there is no reason to store them unless you
333need them later - configure and forget works just fine.
330 334
331=over 4 335=over 4
332 336
333=cut 337=cut
334 338
449Create a new "empty" perl interpreter process and returns its process 453Create a new "empty" perl interpreter process and returns its process
450object for further manipulation. 454object for further manipulation.
451 455
452The new process is forked from a template process that is kept around 456The new process is forked from a template process that is kept around
453for this purpose. When it doesn't exist yet, it is created by a call to 457for this purpose. When it doesn't exist yet, it is created by a call to
454C<new_exec> and kept around for future calls. 458C<new_exec> first and then stays around for future calls.
455
456When the process object is destroyed, it will release the file handle
457that connects it with the new process. When the new process has not yet
458called C<run>, then the process will exit. Otherwise, what happens depends
459entirely on the code that is executed.
460 459
461=cut 460=cut
462 461
463sub new { 462sub new {
464 my $class = shift; 463 my $class = shift;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines