Ensuring thread safety of template objects

The following headers in the Standard Template Library are reentrant:

The XL C/C++ compiler supports reentrancy to the extent that you can safely read a single object from multiple threads simultaneously. This level of reentrancy is intrinsic. No locks or other globally allocated resources are used.

However, the headers are not reentrant in these cases:

If multiple threads write to a single container, or a single thread writes to a single container while other threads are reading from that container, it is your responsibility to serialize access to this container. If multiple threads read from a single container, and no processes write to the container, no serialization is necessary.