Simplified: I am writing plugins to realbasic. I have two plugins with their own threads. Everything is fine until i start to use std::vector. I have vector<> variables in both plugins and I am not using the vectors to use same data or to share data between threads or anything else. My model looks like this:
thread_1{ vector<> variable_1; foreach{ variable_1.push_back(something); } } thread_2{ vector<> variable_2; foreach{ variable_2.push_back(something); } } If I don't declare the vectors static, the program most of the times crashes. But even when i declare the variables static, and use some of algorithms like sort or copy, the crashes appear again. It seems like the operations on vector are using some abstract class which is not multithread safe or something. Or am I doing something wrong? Thank you.
I am using windows 7 x64, visual studio 2008 pro, compilation on release win32.
somethingis not thread safe?dlls?