From the course: iOS Development: Threading and Grand Central Dispatch

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Developing a custom queue

Developing a custom queue

From the course: iOS Development: Threading and Grand Central Dispatch

Start my 1-month free trial

Developing a custom queue

- [Instructor] Finally, let's look at how to create our own queues, better known as custom queues. Custom queues can be either serial or concurrent. Most often, custom queues are executed on a global queue. Here's how we create custom queues. The difference in code is there to specify an attribute for the concurrent queue. In the absence of an attribute, the custom queue will be a serial queue. Attributes are what define the behavior of the queue. We are presented with two major attributes when creating the queues. We have concurrent, which will make your queue execute tasks concurrently. Custom queues are useful when you want to perform tasks in the background queue and track them. This is to say that requests in these queues actually end up in the global queue. Then we have initially inactive. When we change the attribute to initially inactive, watch what happens when we hit run. Nothing happens. By assigning…

Contents