|
|
| Welcome to the Monastery | |
| PerlMonks |
Re: is ||= threadsafe?by ambrus (Abbot) |
| on Oct 25, 2010 at 10:33 UTC ( #867187=note: print w/ replies, xml ) | Need Help?? |
|
What's more, it can't be implemented as thread safe, because the ||= operator must evaluate its rhs only if the lhs is false, and the expression on the rhs can have any side effect, including waiting a lot, so it would be bad to lock all other threads out during that time.
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||