Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Paul Hodges
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Sat, Jun 03, 2006 at 03:51:45PM -0700, Paul Hodges wrote: > : { no threads; > :print @_.»(); > : } > > It seems a bit odd to use a construct for its syntactic sugar value > but take away its semantics... > > If you just need ordering, this (o

Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Larry Wall
On Sat, Jun 03, 2006 at 03:51:45PM -0700, Paul Hodges wrote: : --- Ashley Winters <[EMAIL PROTECTED]> wrote: : > On 6/2/06, Paul Hodges <[EMAIL PROTECTED]> wrote: : > > : > > my @answer = map { async { &_() } } @jobs; : > : > That still seems too explicit. I thought we had hyperoperators to : > i

Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Paul Hodges
--- Ashley Winters <[EMAIL PROTECTED]> wrote: > On 6/2/06, Paul Hodges <[EMAIL PROTECTED]> wrote: > > > > my @answer = map { async { &_() } } @jobs; > > That still seems too explicit. I thought we had hyperoperators to > implictly parallelize for us: > > my @answer = @jobs.»(); > > Which would

Re: Synchronized / Thread syntax in Perl 6

2006-06-03 Thread Ashley Winters
On 6/2/06, Paul Hodges <[EMAIL PROTECTED]> 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

RE: Synchronized / Thread syntax in Perl 6

2006-06-02 Thread Paul Hodges
--- John Drago <[EMAIL PROTECTED]> wrote: . . . > > class QueueRunner { > >our sub process_queue(Code @jobs_in) { > > my @ans is serial; > > @ans.push map { async { &_() } } @jobs_in; > > @ans; > >} > > } > > my @answer = QueueRunner.process_job_queue( @jobs ); > > Actual

RE: Synchronized / Thread syntax in Perl 6

2006-06-02 Thread John Drago
> > > You mean "is parallel" as a synonym for "is async"? > > > > I think "is parallel" denotes something as usable by multiple threads > > simultaneously, "in parallel". > > "is serial" would denote that only one thread can use the $thing at a > > time, exclusively. > > Are you saying both are as

RE: Synchronized / Thread syntax in Perl 6

2006-06-02 Thread Paul Hodges
--- John Drago <[EMAIL PROTECTED]> wrote: > > You mean "is parallel" as a synonym for "is async"? > > I think "is parallel" denotes something as usable by multiple threads > simultaneously, "in parallel". > "is serial" would denote that only one thread can use the $thing at a > time, exclusively

RE: Synchronized / Thread syntax in Perl 6

2006-06-02 Thread John Drago
> > 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 serializ

RE: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread Paul Hodges
--- John Drago <[EMAIL PROTECTED]> wrote: > 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 n

RE: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread John Drago
in Smith [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 31, 2006 9:43 AM > To: perl6-language@perl.org > Subject: Re: Synchronized / Thread syntax in Perl 6 > > On Tue, May 30, 2006 at 03:41:06PM -0600, John Drago wrote: > > class Foo is synchronized { > > ... &

RE: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread John Drago
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

Re: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread Benjamin Smith
On Tue, May 30, 2006 at 03:41:06PM -0600, John Drago wrote: > class Foo is synchronized { > ... > } > > our method Bar is synchronized { > ... > } > > class Baz { > has $.Bux is synchronized; > } To everyone participating in this thread: There has already been a draft spec for concurrency

Re: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread Paul Hodges
How about one of these? == class Baz { has $.a is restricted; has $.b is controlled; has $.c is unique; has $.d is shared; has $.e is queued; has $.f is token; ... } --- John Drago <[EMAIL PROTECTED]> wrote: > I asked this via the Google Groups interfa

Re: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread Sage La Torra
We could always go with the Windows API "Critical Section" name. Locked is probably as good a descriptor, and avoids anything associated with Windows. Sage James Mastros skribis 2006-05-31 12:03 (+0100): > I don't like the name synchronized -- it implies that multiple things are > happening at

Re: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread Juerd
James Mastros skribis 2006-05-31 12:03 (+0100): > 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 se

Re: Synchronized / Thread syntax in Perl 6

2006-05-31 Thread James Mastros
On Tue, May 30, 2006 at 03:41:06PM -0600, John Drago wrote: > I asked this via the Google Groups interface a few weeks ago, but I'm not > sure if it made it here. > I am asking again in case the question never made it onto the list. > > Has the syntax for synchronized/threaded @things been worked