[Phoenix-pm] greetings

Scott Walters scott at illogics.org
Tue Jul 27 03:28:45 CDT 2004

I tried a few times but I reeled, licking my wounds, each time. 
Threads in Perl are extremely heavy - most things wind up in thread-local-store
so you get copy-on-write semantics like fork() but the setup for a new thread is
far worse than for fork(). When variables are shared, it's extremely difficult to
pass a data structure through it and neigh on impossible to pass a reference to
an object that refers to other objects. Unless each array and hash in the datastructure -
even anonymous ones - has been created :shared or run through share(), it vanishes
without coming out the other side. The other thread never sees it. Objects have
the same problem but they also come unblessed. So threads aren't much better than 
using fork()ed processes with SysV shared memory and semahores and such. 

I've been fiending on Coro, though (as some of you know). Coro is 
non-preemptive, and for variable and datastructure sharing, uses the regular
lexical scope rules and reference rules. None of the above problems exist. 
They're extremely light to create. Doing I/O concurrently takes a little more
work as coroutines don't automatically go to sleep, yield the CPU, and wait for 
data to arrive. Instead you must use special classes to wrap IO:: classes
or the Event class.

I touched on this briefly in my Perl 6-isms part II presentation but I'd
be happy to round it out >=)


On  0, "Metz, Bobby W, WCS" <bwmetz at att.com> wrote:
> Anyone into multi-threaded perl programming?  It's something I have no
> experience in and would love to see an overview if anyone is willing.
> Just a thought.
> Bobby
> -----Original Message-----
> From: phoenix-pm-bounces at pm.org [mailto:phoenix-pm-bounces at pm.org]On
> Behalf Of Douglas E. Miles
> Sent: Monday, July 26, 2004 3:15 PM
> To: phoenix-pm at pm.org
> Subject: Re: [Phoenix-pm] greetings
> Scott Walters wrote:
> > Welcome! 
> > 
> > Mike is constantly threatening to leave us, too, and I think Tim Ayers
> > left a long time ago without saying "goodbye" ;)
> > 
> > So, Doug, when's the next meeting? 
> Next Thursday.  I was planning on putting out an RFP (Request For 
> Presentation) anyway.  Anyone want to volunteer?  If not, I'll come up 
> with something.  If someone already volunteered, refresh my memory.  :)
> _______________________________________________
> Phoenix-pm mailing list
> Phoenix-pm at pm.org
> http://www.pm.org/mailman/listinfo/phoenix-pm
> _______________________________________________
> Phoenix-pm mailing list
> Phoenix-pm at pm.org
> http://www.pm.org/mailman/listinfo/phoenix-pm

More information about the Phoenix-pm mailing list