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

Stathy G Touloumis stouloumis at tungstenlearning.com
Mon Apr 12 10:42:12 CDT 2004


How are you sharing the object?

Use the function call with references :
my $array = [];
&share( $array );
bless $array, $class;

VS

my $array : shared = [];

"If you want to share a newly created reference unfortunately you need to 
use '&share([])' and '&share({})' syntax due to problems with Perl's 
prototyping."



>If a lexical is a "my" variable, then yes
>
>----- Original Message -----
>From: "Steven Lembark" <lembark at wrkhors.com>
>To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
>Sent: Sunday, April 11, 2004 9:33 PM
>Subject: Re: [Chicago-talk] What's up with threads not sharing objects
>
>
> >
> >
> > -- me at heyjay.com
> >
> > > 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
> >
> > Correction: was the value >stored< in a lexical?
> >
> > --
> > 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
> >
> >
>_______________________________________________
>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