Open 0x62ash opened 5 years ago
The reason there is no way to pass arguments as of now is mostly because
$pm->start_child( 'foo', 1, 2, 3, \&callback );
can be written as
$pm->start_child( 'foo', sub { callback(1,2,3) } );
But I'm not opposed at all to that bit of syntactic sugar. Would you like to do us the honors and whip up a PR? :-)
Proposal
start_child [ $process_identifier, @args, ] \&callback
Implementation (not tested)