Have a look at this:
#!/usr/bin/perl -w
use threads;
use threads::shared;
my %b : shared = ();
$b{a} = 1;
$b{a}{a} = 1; # works
eval {
$b{b} = ();
$b{b}{a} = 1; # fails
};
print $@;
eval {
$b{c} = undef;
$b{c}{a} = 1; # fails
};
print $@;
Is this related to autovivification?
Hi,
my program using perl 5.8.0, threads and threads::shared segfaults. Here
is a backtrace. Can anyone say what's going wrong?
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3076 (LWP 15533)]
0x0809b67b in Perl_mg_magical () at eval.c:41
41 eval.c: No such file or
> But I see that you may have a misconception about what enqueue adds and
> dequeue(_nb) removes. "enqueue" packages up _all_ of the parameters into a
> single "package" in the queue, which is returned as one set of parameters
> by "dequeue(_nb)". Try this:
>
> while ( my( $one, $two ) = $q->dequ
At 10:07 PM 10/28/02 -1000, Joshua Hoblitt wrote:
> Could you give me an example which gives you the error? I'd be
surprised...
--
use strict;
use Thread::Queue::Any;
my $q = Thread::Queue::Any->new();
$q->enqueue( [ 1, 2 ], [ 3, 4 ] );
while ( my( $one, $two ) = @{ ($q->dequeue_nb)[0] } ) {
> Could you give me an example which gives you the error? I'd be surprised...
--
use strict;
use Thread::Queue::Any;
my $q = Thread::Queue::Any->new();
$q->enqueue( [ 1, 2 ], [ 3, 4 ] );
while ( my( $one, $two ) = @{ ($q->dequeue_nb)[0] } ) {
print "$one, $two\n";
}
--
Can't use an u