This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Definitive answer about thread-safety of std::string



While libstdc++ documentation makes it clear that the library is thread-safe as long as an object is locked so that only a single concurrent thread can access it, I have seen some conflicting statements elsewhere that elude to the fact that std::string may be safe for access by concurrent threads. I would appreciate if anyone could enlighten me on whether std::string is in fact safe for access by concurrent threads without explicit locking, or if it requires a read-write locks or a full locks instead.


Regards,

Chad.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]