Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: is ||= threadsafe?

by ambrus (Abbot)
on Oct 25, 2010 at 10:33 UTC ( #867187=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://867187]
help
Chatterbox?
[shmem]: Discipulus: the <<>> operator is quite new, it is in perl5.24 for instance
[Discipulus]: ah! thanks shmem it works in strawberry 5.24
[shmem]: ah. Introduced in 5.22.0, see perl5220delta
[Discipulus]: if so the previous error is a bit misleading, anyway
[shmem]: well, previous to that << was always treated as the left-shift operator
[Eily]: or the here-doc operator
[Eily]: which is actually how it is parsed in this case

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2017-07-21 09:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (320 votes). Check out past polls.