eue( Code @jobs_in ) returns List of Any {
> > my Any @results is parallel;
> > my Thread @workers = ();
> >
> > for @jobs_in {
> > @workers.push( async { &_() } );
> > }
> > for @workers {
> > @results.push( $_.jo
=
class QueueRunner {
our sub process_job_queue( Code @jobs_in ) returns List of Any {
my Any @results is parallel;
my Thread @workers = ();
for @jobs_in {
@workers.push( async { &_() } );
}
for @workers {
@results.push( $_.join() );
}
return @results;
}# end process_job_queue()
}# end QueueRunner
# Elsewhere...
my @answer = QueueRunner.process_job_queue( @jobs );
#
I made absolutely no progress here. It seems to me that it's no more obvious
what's going on here than in the Perl5 version. Any
comments?
Regards,
John Drago
Thanks to all who have read or replied -
I'm reading the Concurrency POD right now - more questions when I'm done.
____
John Drago | VP Software Engineering
[EMAIL PROTECTED]
www.precissystems.com
> -Original Message-
> From: Benjam
James Mastros wrote:
> I don't like the name synchronized -- it implies that multiple things are
> happening at the same time, as in synchronized swiming, which is exactly the
> opposite of what should be implied. "Serialized" would be a nice name,
> except it implies serializing to a serial form
ethod Bar is synchronized {
...
}
class Baz {
has $.Bux is synchronized;
}
...or is there some new, less Java-esque way to express "only one thread may
access this thing at a time"?
____
John Drago | VP Software Engineering
[