[Development] Question about QCoreApplicationData::*_libpaths

Thiago Macieira thiago.macieira at intel.com
Fri Jan 22 22:26:13 CET 2016


On Friday 22 January 2016 13:37:22 Matthew Woehlke wrote:
> If you really have *the same* vector... Don't do that :-). Note that
> this implies that you are either operating on the same variable, or one
> thread is operating on a reference. That's not very common, and it's
> just not thread safe, ever¹, regardless of the data type.
> 
> (¹ Well, besides atomic types, but we're talking about containers...)

You may still have data races of more benign kind, like read-after-write and 
write-after-write. If two threads race to write a value, it's undetermined 
which one wins.

"Atomic" does not imply "magic" :-)
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center




More information about the Development mailing list