How to read through an unordered_map while it is changing dynamically all the time
<p>For some reason, we have been using the *unordered_map* type to store objects in our project. In run time, the size of the map is always changing as it may drop objects or add new objects at any time. Now I need to traverse the objects of it one by one in another thread. You know I can't do this by using the iterator because it may go invalid when the map changed. So my question is how I can go through the unordered_map correctly in spite of the dynamic change.</p>
