in the container is not safe."
Can somebody come up with an example for this case ?
i think it refers to adding a new element to a container whilst iterating over it, but i'm not sure
Yes it means that but why is it risky? Can you provide some examples?
You need to know about concurrency before these things will make sense
That is because when we insert element in map which is internally implemented as balanced binary tre more appropriate which is red Balck tree it re-arranges all nodes to keep the tree balanced So if there is any iterator accessing any node concurrently it can be invalidated one
Обсуждают сегодня