stl vector

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I am devloping an application in VC++ with Visual Studio 2005. In this
applicatin, Threadpool and stl classes are there. All threads will
use(sending by pointer to vector) stl vector simultaneously for reading and
writing purpose. Sometimes, application getting crash. I think, vectors are
threadsafe. It is getting crash at vector iterators. I checked in call stack
also. How to avoid this problem without synchronization?
 
You have to synchronize. Reading and writting from different threads is not
thread safe in STL
 
Back
Top