You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently running Strawberry Perl 5.32.1 on Windows 11 22H2. I am writing scripts to do some bulk data processing which necessitates parallelism. I have discovered that including Chart::GGPlot and any module in Parallel causes failures in forking. The issue is simple to replicate. The following code fails to run:
`use Parallel::ForkManager;
use Chart::GGPlot;
use Autoloader;
my $pm = Parallel::ForkManager->new(3);
$pm->run_on_finish(
sub {
my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $return_ref) = @_;
my $returned = ${$return_ref};
print "Child with ", $returned->{"filename"}, " finished.\n";
}
);
LOOP:
foreach my $file (@argv) {
my $pid = $pm->start and next LOOP;
print "Starting with $file \n";
my $return_data = {};
$return_data->{"filename"} = $file;
$pm->finish(0, $return_data);
}
$pm->wait_all_children;
print "Is this gonna work???\n";`
Note that no error is immediately thrown, and the code simply terminates early. However, commenting out the usage of Chart::GGPlot allows the code to execute to completion. I can also try to fish out error messages if that would be helpful.
Thank you!
The text was updated successfully, but these errors were encountered:
I am currently running Strawberry Perl 5.32.1 on Windows 11 22H2. I am writing scripts to do some bulk data processing which necessitates parallelism. I have discovered that including Chart::GGPlot and any module in Parallel causes failures in forking. The issue is simple to replicate. The following code fails to run:
`use Parallel::ForkManager;
use Chart::GGPlot;
use Autoloader;
my $pm = Parallel::ForkManager->new(3);
$pm->run_on_finish($returned = $ {$return_ref};
sub {
my ($pid, $exit_code, $ident, $exit_signal, $core_dump, $return_ref) = @_;
my
print "Child with ", $returned->{"filename"}, " finished.\n";
}
);
LOOP:
foreach my $file (@argv) {
my $pid = $pm->start and next LOOP;
print "Starting with $file \n";
my $return_data = {};
$return_data->{"filename"} = $file;
$pm->finish(0, $return_data);
}
$pm->wait_all_children;
print "Is this gonna work???\n";`
Note that no error is immediately thrown, and the code simply terminates early. However, commenting out the usage of Chart::GGPlot allows the code to execute to completion. I can also try to fish out error messages if that would be helpful.
Thank you!
The text was updated successfully, but these errors were encountered: