阅读背景:

是否需要锁定只从一个线程写入*且*仅从另一个线程读取的数组?

来源:互联网 

I have two threads running. They share an array. One of the threads adds new elements to the array (and removes them) and the other uses this array (read operations only). Is it necessary for me to lock the array before I add/remove to/from it or read from it?I have two threads running. They share an array




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: