Is this an acceptable way to lock a container using C++? Is this an acceptable way to lock a container using C++? multithreading multithreading