GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Parallel::ForkManager::Child(3) User Contributed Perl Documentation Parallel::ForkManager::Child(3)

Parallel::ForkManager::Child - role adopted by forked Parallel::ForkManager processes

version 2.02

   use 5.10.0;

   use Parallel::ForkManager;

   my $fm = Parallel::ForkManager->new;

   say "parent does not consume the child role: ", $fm->does('Parallel::ForkManager::Child');

   $fm->start_child(sub{ 
        sleep $_;
        say "but the child does: ", $fm->does('Parallel::ForkManager::Child');
        say "child $_ says hi!"

   }) for 1..3;

When the parent Parallel::ForkManager object forks a child process, its forked incarnation consumes this role. The role doesn't do much: it changes the returning values of "is_child" and "is_parent" in the way you'd expect, change "start" so that it'd die if called from within the child, and change the implementation of "finish" to potentially send data back to the parent process.

  • dLux (Szabó, Balázs) <dlux@dlux.hu>
  • Yanick Champoux <yanick@cpan.org>
  • Gabor Szabo <gabor@szabgab.com>

This software is copyright (c) 2018, 2016, 2015 by Balázs Szabó.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

2018-10-08 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.