develooper Front page | perl.perl6.language | Postings from June 2006

Re: Synchronized / Thread syntax in Perl 6

Thread Previous | Thread Next
From:
Ashley Winters
Date:
June 3, 2006 13:05
Subject:
Re: Synchronized / Thread syntax in Perl 6
Message ID:
cda42dbb0606031304q65d1ca66x10419dce58015359@mail.gmail.com
On 6/2/06, Paul Hodges <ydbxmhc@yahoo.com> wrote:
> Though if that works, you could squish this example even more, to
>
>  class QueueRunner {
>
>    our sub process_queue(Code @jobs_in) {
>        map { async { &_() } } @jobs_in;
>    }
>
>  }# end QueueRunner
>
>  # Elsewhere...
>  my @answer = QueueRunner.process_job_queue( @jobs );
>
> and the issues of serialization are hidden in the map() call. For all
> that....
>
>  my @answer = map { async { &_() } } @jobs;
>
> though that gets away from the point.
>
> Someone smack me if I'm drifting too far here?

That still seems too explicit. I thought we had hyperoperators to
implictly parallelize for us:

my @answer = @jobs.ยป();

Which would run them in parallel automatically, if possible.

- Ashley Winters

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About