Which STL container has a thread safe insertion process? I want several threads to simultaneously insert in the same container. Any implementation other than STL (i.e., Boost) is welcome!
Which STL container has a thread safe insertion process? I want several threads to
Share
The Standard does not require any STL containers to be thread safe. An implementation could be thread safe, although I’m not sure how they could pull it off with the current API; and changing the API would make them no longer compatible with the Standard.
If the LGPL is acceptable, Intel TBB has thread safe containers (these containers use locks internally, which does affect their performance).