in reply to What is this "Do you need to predeclare croak" about? [SOLVED]
Hi Karl, I am not clever enough to know how this could lead to the warning, but do you need to use a mutex since you are writing to a shared data structure?
... use MCE::Loop; use MCE::Shared; use MCE::Mutex; my $result = MCE::Shared->hash; my $mutex = MCE::Mutex->new ... mce_loop { my @data = $fetch->($_); sleep AMOUNT; $mutex->enter( $result->set( $_ => \@data ) ); } @urls; ...
Hope this helps! (Mario would know better...)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: What is this "Do you need to predeclare croak" about?
by marioroy (Prior) on Jun 14, 2017 at 21:55 UTC | |
by 1nickt (Canon) on Jun 15, 2017 at 02:44 UTC | |
Re^2: What is this "Do you need to predeclare croak" about?
by karlgoethebier (Abbot) on Jun 14, 2017 at 19:20 UTC | |
by Anonymous Monk on Feb 21, 2018 at 09:41 UTC |