Skip to content

Instantly share code, notes, and snippets.

@lilee
Created September 6, 2012 04:04
Show Gist options
  • Select an option

  • Save lilee/3651054 to your computer and use it in GitHub Desktop.

Select an option

Save lilee/3651054 to your computer and use it in GitHub Desktop.
STL容器注意迭代器失效问题
多线程访问STL的容器
线程1向一个vector中插入一个元素,会导致线程2中已经获得到的迭代器失效,迭代器指向的值不可预期
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment