Don't ask to ask, just ask | |
PerlMonks |
Re^2: Inconsistent results with keys on thread shared hashesby Anonymous Monk |
on Aug 03, 2022 at 19:17 UTC ( [id://11145928]=note: print w/replies, xml ) | Need Help?? |
A shared hash in list context (my @a = %testOne) counts as modifying its internal iterator, too? (@a size will get 10,4,12,18 or whatever). And neither such assignment nor keys built-in are "atomic" thread-wise then, and it's not a bug? Yes, using a lock helps. In scalar context it evaluates to 1, not to number of keys. Not documented anywhere, neither.
In Section
Seekers of Perl Wisdom
|
|