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

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to