diff options
author | Artur Bergman <sky@nanisky.com> | 2003-01-03 15:15:14 +0000 |
---|---|---|
committer | Artur Bergman <sky@nanisky.com> | 2003-01-03 15:15:14 +0000 |
commit | 5a47f09b1f37ad670eb23486a6efdb4c448efdfa (patch) | |
tree | 18b6811e7419b7d7d811cfe4d3cd10c043562cb5 /ext/threads/shared | |
parent | ea0630ea3fba86265d2781f9d1d36d7250879de1 (diff) | |
download | perl-5a47f09b1f37ad670eb23486a6efdb4c448efdfa.tar.gz |
Change pp_lock to take a reference instead of a
scalar since it wouldn't fork for the HELEM/AELEM
case. This was reported in bug #10045
p4raw-id: //depot/perl@18413
Diffstat (limited to 'ext/threads/shared')
-rw-r--r-- | ext/threads/shared/t/hv_refs.t | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ext/threads/shared/t/hv_refs.t b/ext/threads/shared/t/hv_refs.t index 94bf822f8f..fb3c8de3f8 100644 --- a/ext/threads/shared/t/hv_refs.t +++ b/ext/threads/shared/t/hv_refs.t @@ -30,7 +30,7 @@ sub skip { use ExtUtils::testlib; use strict; -BEGIN { print "1..13\n" }; +BEGIN { print "1..14\n" }; use threads; use threads::shared; ok(1,1,"loaded"); @@ -75,3 +75,16 @@ ok(10, keys %foo == 0, "And make sure we realy have deleted the values"); ok(13, $hash1{hash}->{hash}->{thread} eq "yes", "Check hash created in another thread"); } +{ + my $h = {a=>14}; + my $r = \$h->{a}; + share($r); + lock($r); + lock($h->{a}); + ok(14, 1, "lock on helems now work, this was bug 10045"); + +} + + + + |