On 2016-01-22 13:02, Bubke Marco wrote: > Actually what is happen if I am in the middle of changing a qvector, and > then copying the vector in an other thread?
Are you concurrently modifying and copying *the same* vector, or a shallow copy that, under the hood, happens to be shared? The latter is no problem; as soon as you try to modify the vector, it will detach, and they'll cease being shared. The one that's just being copied is not modified. 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...) -- Matthew _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development