stl vector

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?
 
C

Cholo Lennon

You have to synchronize. Reading and writting from different threads is not
thread safe in STL
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top