Recently, I discussed the issue of thread safety of map containers with my colleagues. We each had different opinions, so I checked the information online and got an answer that everyone agreed with, that is: when the operation of the container is no-const and multi-threaded, it should Lock it up and protect it. Below is the original question and answer seen on stack overflow.