in reply to Perl fork childs with variables
use forks; my $fork1 = async { return subroutine($param1, $param2); }; my $fork2 = async { return subroutine($param3, $param4); }; my $return1 = $fork1->join(); my $return2 = $fork2->join();
But there's no need for two forks.
use forks; my $fork1 = async { return subroutine($param1, $param2); }; my $return2 = subroutine($param3, $param4); my $return1 = $fork1->join();
|
---|
In Section
Seekers of Perl Wisdom