Являются ли STL Map или HashMaps потокобезопасными?C++

Программы на C++. Форум разработчиков
Гость
Являются ли STL Map или HashMaps потокобезопасными?

Сообщение Гость »


Can I use a map or hashmap in a multithreaded program without needing a lock? i.e. are they thread safe?

I'm wanting to potentially add and delete from the map at the same time.

There seems to be a lot of conflicting information out there.

By the way, I'm using the STL library that comes with GCC under Ubuntu 10.04

EDIT: Just like the rest of the internet, I seem to be getting conflicting answers?


Источник: https://stackoverflow.com/questions/343 ... hread-safe

Вернуться в «C++»