MCPcopy Create free account
hub / github.com/MOBIN-F/Thread / IterationTest

Class IterationTest

src/com/mobin/thread/IterationTest.java:16–49  ·  view source on GitHub ↗

Created by Mobin on 2016/3/31. / /CopyOnWriteArrayList会先复制一个集合副本,当对集合进行修改时普遍的上修改的是副本里的值, 修改完后再将原因集合的引用指向这个副本,避免抛出ConcurrentModificationException异常 (具体分析见笔记) 多线程可以同时对这个容器进行迭代,而不会干扰或者与修改容器的线程相互干扰

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected