I want to know if gnu g++'s STL implementation is thread safe or not.

If it's not thread safe I want to know hou you deal with the problem
of multithreading.

Initially I suppose that protecting all access to an STL containter
with mutexes, I can resolve the problem, but I have a doubt about it:
Memory allocation.
I can protect with a mutex access to a resource (for example an STL
container), but the default allocator can be accessed concurrently
from several containers and/or instances of a concrete container, and
I haven't the control of it.
There are other techniques for efficiency, as sharing implementation
(with reference counting) that I suppose that can have problems with
multithreading but I don't know if g++'s STL implementation uses that
kind of techniques.

Thanks in advance.

_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to