3
votes

As the NSOperationQueue Class Reference said: In iOS, operation queues do not use Grand Central Dispatch to execute operations. They create separate threads for non-concurrent operations and launch concurrent operations from the current thread.

But I found in iOS 4.2.1,queue always create threads for concurrent or non-concurrent operations. And I think queue don't care concurrent or non-concurrent at all, because a breakpoint in isConcurrent never be broken. So I think the Reference was wrong...

2

2 Answers

2
votes

If you look at the documentation for NSOperation, you should see a note about Mac 10.6 (which roughly corresponds to iOS 4.0) ignoring isConcurrent.

Basically, the only reason to create a concurrent NSOperation would be if you were going to fire it manually.

0
votes

NSOperationQueue does use GCD. From the documentation:

In iOS 4 and later, operation queues use Grand Central Dispatch to execute operations.