Subject: | New accessor get_max_procs |
It would be nice if there was a get_max_procs accessor. See attached patch. The idea is to be able to do something like
$SIG{TTIN} = sub {
$pm->set_max_procs($pm->get_max_procs + 1);
};
without maintaining an extra variable.
Subject: | pfm-get-max-procs.patch |
diff -r 94e0c26dc0bb lib/Parallel/ForkManager.pm
--- a/lib/Parallel/ForkManager.pm Mon Nov 10 09:11:33 2014 +0200
+++ b/lib/Parallel/ForkManager.pm Mon Dec 22 17:36:35 2014 +0100
@@ -630,6 +630,11 @@
$s->{max_proc} = $mp;
}
+sub get_max_procs {
+ my ($s)=@_;
+ return $s->{max_proc};
+}
+
# OS dependant code follows...
sub _waitpid { # Call waitpid() in the standard Unix fashion.