Difference between Dispatch Queue and NSOperationQueue

Youngwing picture Youngwing · Jul 11, 2013 · Viewed 20.4k times · Source

I am very new to GCD and threading. I have gone through the tutorials and getting very much confusion. Can some one explain in simple words.Please don't suggest apple developer links..

Thanks in advance !

Answer

Sabareesh picture Sabareesh · Jul 11, 2013

NSOperationQueue can be more suitable for long-running operations that may need to be cancelled or have complex dependencies. GCD dispatch queues are better for short tasks that should have minimum performance and memory overhead.

It is possible to cancel operations that have been enqueued in an NSOperationQueue (as far as the operations support it). When you enqueue a block in a GCD dispatch queue, it will definitely be executed at some point.

check the below link,it may be helpful to you.

Operation Queue vs Dispatch Queue for iOS Application