develooper Front page | perl.perl5.porters | Postings from July 2016

[perl #60294] threads::shared resets %hash iterators

Thread Previous
From:
Dan Collins via RT
Date:
July 18, 2016 16:52
Subject:
[perl #60294] threads::shared resets %hash iterators
Message ID:
rt-4.0.18-26352-1468860721-912.60294-15-0@perl.org
On Sun May 26 10:14:27 2013, jkeenan wrote:
> Is there anyone who has built a threaded perl on 5.18 who could check
> out the issues raised in this older ticket?
> 
> Thank you very much.
> Jim Keenan

Yes. The problem in this ticket, if indeed it is a problem, is still present in 5.25.2.

dcollins@nightshade64:~/toolchain$ perl5.25.2-thread-multi 60294.pl
threads version: 2.09
threads::shared version: 1.52
By taking a reference first...
c t w e v i p s x y  ...and so on

By de-ref the shared hash-of-hashes each time...
c c c c c c c c c c  ...and so on

The "address of" the hash, obtained by printing $outer{inner}, also changes every loop iteration. I am not surprised that this resets `each`.

-- 
Respectfully,
Dan Collins

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=60294

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About