Являются ли 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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

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