one thread try to read from vector and another thread try to delete from vector how to do it
Recommended Answers
Jump to PostUse a mutex to protect the access to vector. Mutexes are your best friends in multi-threading. A mutex (short for "mutual exclusion") is a thing that is supported by all multi-threading-capable operating systems (the API functions to use may change depending on your OS). What it does is that it …
All 2 Replies
mike_2000_17
2,669
21st Century Viking
Team Colleague
Featured Poster
Agni
370
Practically a Master Poster
Featured Poster
ZlapX
commented:
sucks balls
+0
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.