开发者

Many NSOperationQueues = Many Threads?

I'm wondering would there be many threads if I hav开发者_如何学运维e one NSOperationQueue in each of my View Controllers, that is, I have many NSOperationQueues in my app.

Thank you.


Every NSOperationQueue, when running, its execution of the current NSOperation is on a separate thread.

If you've called -setMaxConcurrentOperationCount: passing in 1, then you're guaranteed to only have one NSOperation running in the queue at any given time. (i.e. a serial queue.)

Otherwise, your NSOperationQueue could have as many as NSOperationQueueDefaultMaxConcurrentOperationCount threads running at any given time.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜