Parallel::ForkManager::Child(3pm)

Parallel::ForkManager::Child3pm

Role adopted by forked parallel::forkmanager processes

Usage

   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;

Version

version 2.04

Overview

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.

Releases

5 releases since Debian 10 (Buster); the text changed 2 times.

  1. 10–12
  2. 13
  3. Arch