Since this is a 'test & set',
It certainly isn't implemented using an atomic instruction, so yes. If $PageQueue is a shared variable, and the statement is part of a thread function body that may be instantiated more than once, you need to lock it before setting it.
In reply to Re: is ||= threadsafe?
by BrowserUk
in thread is ||= threadsafe?
by perl-diddler
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |