C++11 STL containers and thread safety

前端 未结 3 1183
野性不改
野性不改 2020-11-28 03:57

I have trouble finding any up-to-date information on this.

Do C++11 versions of STL containers have some level of thread safety guaranteed?

I do expect that

3条回答
  •  情话喂你
    2020-11-28 04:51

    No. Check out PPL or Intel TBB for thread safe STL-like containers.

    Like others have noted they have usual "multiple reader thread safety" but that is even pre C++11. Ofc this doesnt mean single writer multiple readers. It means 0 writers. :)

提交回复
热议问题