in reply to is ||= threadsafe?
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.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: is ||= threadsafe?
by ysth (Canon) on Oct 25, 2010 at 19:20 UTC |
In Section
Seekers of Perl Wisdom