--- 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 ); > > Actually I think you did it just right. > I think that horse is dead now.
LOL!! I'm flattered. =o) > So, what about "serial" classes and methods?: > > # Does marking this class "is serial" mean it's forced to be a > singleton? Hmm.... I wouldn't think so. You should still be able to spawn object instances, but I'd say it scopes the lock to the whole class, so that everything in that container is locked any time anything in the class in accessed. It's a cheap way to make all shared resources queue up nicely, if you just want a quick and dirty script instead of something well streamlined. Kind of like locking at the DB or table level instead of just the row, but there are times when that's what you need. . . . __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com