New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
threads::shared resets %hash iterators #9551
Comments
From kbrintn@netstats-poll-07.ip.qwest.netCreated by kbrintn@netstats-poll-07.ip.qwest.netI am passing a hash-of-hashes from one thread toa nother. I found that if I iterate over the inner hashes with each This program illustrates the problem: ################################################################# #!/usr/bin/perl use strict; my %outer :shared; $outer{inner} = &share({}); ################################### print "threads version: $threads::VERSION\n"; print "By taking a reference first...\n"; my $iter = 0; print " ...and so on\n\n"; ################################### print "By de-ref the shared hash-of-hashes each time...\n"; $iter = 0; print " ...and so on\n"; ################################################################# On my system it outputs as follows: threads version: 1.07 By de-ref the shared hash-of-hashes each time... Perl Info
|
From @jkeenanOn Sat Nov 01 11:30:29 2008, kbrintn@netstats-poll-07.ip.qwest.net wrote:
Is there anyone who has built a threaded perl on 5.18 who could check Thank you very much. |
The RT System itself - Status changed from 'new' to 'open' |
From @dcollinsnOn Sun May 26 10:14:27 2013, jkeenan wrote:
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 By de-ref the shared hash-of-hashes each time... The "address of" the hash, obtained by printing $outer{inner}, also changes every loop iteration. I am not surprised that this resets `each`. -- |
Migrated from rt.perl.org#60294 (status was 'open')
Searchable as RT60294$
The text was updated successfully, but these errors were encountered: