Skip to content

Instantly share code, notes, and snippets.

View lilee's full-sized avatar

Ethan Walker lilee

View GitHub Profile
@lilee
lilee / stl_container_iterator_invalid
Created September 6, 2012 04:04
STL容器注意迭代器失效问题
多线程访问STL的容器
线程1向一个vector中插入一个元素,会导致线程2中已经获得到的迭代器失效,迭代器指向的值不可预期