Perl internally locks the variable before reading from or writing to it
Thanks, I should have thought that perl somehow protects its internal state. I couldn't find anything in threads::shared manual, so I looked into source and what I understand is that perl locks not just variable but the whole shared space, is it correct?
In reply to Re^3: threads::shared - when to lock a hash ?
by zwon
in thread threads::shared - when to lock a hash ?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |