Is std::string thead-safe with gcc 4.3?

后端 未结 6 1412
野性不改
野性不改 2020-12-05 00:46

I\'m developing a multithreaded program running on Linux (compiled with G++ 4.3) and if you search around for a bit you find a lot of scary stories about std::string not bei

6条回答
  •  盖世英雄少女心
    2020-12-05 01:07

    No STL container is thread safe. This way, the library has a general purpose (both to be used in single threading mode, or multi threading mode). In multithreading, you'll need to add the synchronization mechanism.

提交回复
热议问题