[Chicago-talk] What's up with threads not sharing objects

me at heyjay.com me at heyjay.com
Sun Apr 11 20:42:31 CDT 2004


I'm sure I tried (when I had v5.8 installed) sharing a referent, and it
didn't work.  I'm installing a new machine and try it then

Jay
----- Original Message ----- 
From: "Steven Lembark" <lembark at wrkhors.com>
To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
Sent: Sunday, April 11, 2004 6:37 PM
Subject: Re: [Chicago-talk] What's up with threads not sharing objects


>
>
> -- me at heyjay.com
>
> > I thought I read that you can't share objects.  I'm trying to find where
I
> > read that.
>
> I'll save you some time: you didn't read it anywhere.
>
> The perl threading model localizes lexicals, which may
> be what you're thinking of. Nothing w/in the threading
> model forces privitazation of blessed referents.
>
> Obviously, you have to be careful in handling the shared
> data structures. But once they are share-able the struct's
> are common to all threads.
>
> You cannot share data structs internally across forks,
> but evern that can be coverome via shared memory. The
> separation of data between separate processes forked
> from the same parent may be what you're thinknig of
> with the issue on strruct's between threads?
>
>
> > See if you can share an object and update it with both threads
>
> Why would you expect that I cannot?
>
> Have you read the perlthrtut?
>
>
> --
> Steven Lembark                               2930 W. Palmer
> Workhorse Computing                       Chicago, IL 60647
>                                             +1 888 359 3508
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at mail.pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
>
>




More information about the Chicago-talk mailing list