iaw4 has asked for the wisdom of the Perl Monks concerning the following question:
I am (still) wondering whether there is something like apple's grand central dispatch for perl. perl seems well suited to it, too. Syntax could be something like:
grandcentral_like_runall then runs these subroutines on as many cores as the processor has, and continues on only after all three are complete.sub runme { my $arg=shift; # do something very long that has no side effects return @stuff; } sub a { runme(1); } sub b { runme(2); } sub c { runme(3); } my @results = grandcentral_like_runall( \a, \b, \c );
Does some package with this sort of functionality already exist?
/iaw
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: grand central dispatch like mechanism?
by BrowserUk (Patriarch) on Feb 17, 2010 at 16:36 UTC | |
by iaw4 (Monk) on Feb 18, 2010 at 01:37 UTC | |
by BrowserUk (Patriarch) on Feb 18, 2010 at 06:08 UTC | |
|
Re: grand central dispatch like mechanism?
by Corion (Patriarch) on Feb 17, 2010 at 15:25 UTC |