in reply to is ||= threadsafe?

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.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
RIP an inspiration; A true Folk's Guy