Open stevieb9 opened 10 months ago
We need to reproduce the issue so we can test it and fix it.
To test this, we could remove the Dumper
statement in global_register()
and see if we can reproduce the problem there.
See if a full hash reassignment does the same thing Dumper
does
https://stackoverflow.com/questions/3010712/how-do-perl-firstkey-and-nextkey-work
This actually may be a race condition between a STORE and FETCH
Tie::Hash doc: http://ww2.cs.lamar.edu/doc/perl-doc/pod/perltie.html
Check whether NEXTKEY is even used in a hash iteration, or if just FIRSTKEY is
Should we change things like this?
sub FIRSTKEY {
my $self = shift;
#build iterator
$self->{_list} = [ sort keys %{$self->{_hash}} ];
return $self->NEXTKEY;
}
sub NEXTKEY {
my $self = shift;
return shift @{$self->{_list}};
}
See #38
This may fix the having to use
Dumper