只在写入的时候加了锁 复制了一个数组过来 不会影响读取,而且给array加了volatitle关键字,一旦改变立刻可以看到 转载于:https://www.cnblogs.com/yanLog/p/9077520.html