O'Reilly logo

iOS Programming Cookbook by Hossam Ghareeb

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Operation queues

In OperationQueue, we will see another way to perform concurrency in iOS. OperationQueue is a higher-level abstraction of the queue model; on the other hand, GCD is a lower-level C API. OperationQueue is built on top of GCD but in a more object-oriented fashion. In this section, we will perform the same demo but with OperationQueue, and we will see how simple it is, as with GCD.

Getting ready

Before getting started with OperationQueue, let's talk about how it is different from GCD:

  1. It doesn't follow FIFO and doesn't conform to First-In-First-Out like GCD. There are two reasons why it doesn't stick to FIFO. The first one is that you can set an execution priority to the operations so that the operation with the highest priority ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required