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
From the course: iOS Development: Threading and Grand Central Dispatch
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.