in reply to Strange (for me) behavior of Parallel::ForkManager
That's expected behavior---finish() is not supposed to return. But why would you want to pass in a code reference as a return code? None of the example code I've looked at does that.
In any case I what you need to do is call finish() within the loop:
while (<LIST>){ $manager->start and next; my @array = split( /\s+/, $_ ); # do child stuff $manager->finish; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Strange (for me) behavior of Parallel::ForkManager
by Sterh (Novice) on Nov 06, 2012 at 19:28 UTC | |
by mbethke (Hermit) on Nov 06, 2012 at 20:01 UTC | |
by Sterh (Novice) on Nov 07, 2012 at 01:27 UTC | |
by ikegami (Patriarch) on Mar 02, 2013 at 22:36 UTC |