开发者

iPhone accessing one resource by two threads

开发者 https://www.devze.com 2023-01-08 21:56 出处:网络
I want t开发者_StackOverflowo synchronize one queue among two threads. Such as one thread performs enqueue and other performs dequeue.

I want t开发者_StackOverflowo synchronize one queue among two threads. Such as one thread performs enqueue and other performs dequeue. Any ideas??


Cocoa class like NSArray or NSMutableArray is non thread safe, you have to use object NSLock class to make them thread safe.

0

精彩评论

暂无评论...
验证码 换一张
取 消