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.
精彩评论