… | |
… | |
309 | my ($fork_fh) = @_; |
309 | my ($fork_fh) = @_; |
310 | }); |
310 | }); |
311 | |
311 | |
312 | =back |
312 | =back |
313 | |
313 | |
314 | =head1 FUNCTIONS |
314 | =head1 THE C<AnyEvent::Fork> CLASS |
|
|
315 | |
|
|
316 | This module exports nothing, and only implements a single class - |
|
|
317 | C<AnyEvent::Fork>. |
|
|
318 | |
|
|
319 | There are two constructors that both create new processes - C<new> and |
|
|
320 | C<new_exec>. The C<fork> method creates a new process by forking an |
|
|
321 | existing one and could be considered a third constructor. |
|
|
322 | |
|
|
323 | Most of the remaining methods deal with preparing the new process, by |
|
|
324 | loading code, evaluating code and sending data to the new process. They |
|
|
325 | usually return the process object, so you can chain method calls. |
|
|
326 | |
|
|
327 | If a process object is destroyed before calling its C<run> method, then |
|
|
328 | the process simply exits. After C<run> is called, all responsibility is |
|
|
329 | passed to the specified function. |
315 | |
330 | |
316 | =over 4 |
331 | =over 4 |
317 | |
332 | |
318 | =cut |
333 | =cut |
319 | |
334 | |