in reply to Interrupt multi-process program while using MCE::Shared hash: END block code does not (all) run

Oh yes, one might want to display the shared data. This will do.

$SIG{'TERM'} = sub { if (MCE->wid > 0) { # worker MCE->exit(0); } else { # parent say 'Parent is ready to dump'; say 'Dumping: ' . Dumper \%hash; MCE::Signal::stop_and_exit('TERM'); } };
  • Comment on Re: Interrupt multi-process program while using MCE::Shared hash: END block code does not (all) run
  • Download Code