From: Jeremy Vinding <[EMAIL PROTECTED]>
> On Tue, 2002-11-05 at 14:18, Jenda Krynicky wrote:
>
> >
> > Because you'd have a shared reference to a private array.
> >
> > I believe the docs for threads.pm and Thread::Queue explain this.
> > I'm not using Perl 5.8 yet so I can't tell.
>
> they don't but i guess that makes sense, however, 'perldoc
> threads::shared', shows these examples:
> my($scalar, @array, %hash);
> share($scalar);
> share(@array);
> share(%hash);
> my $bar = &share([]);
> $hash{bar} = &share({});
>
> any suggestions as to how i can create anonymous arrays on the fly in
> one thread and access them in another?
Try
enqueue( &share([1, 2, 3, 4]))
Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed
to get drunk and croon as much as they like.
-- Terry Pratchett in Sourcery
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]