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

Unlock the full course today

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

Solution: Resolving a deadlock

Solution: Resolving a deadlock

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

Start my 1-month free trial

Solution: Resolving a deadlock

(upbeat music) - [Instructor] Hopefully you were able to solve the challenge. There are two ways to fix the problem. The first one is by making the QA concurrent queue by adding the attribute parameter. Let's go ahead and do that. And run our code. When this is done, the inner block won't have to wait for the outer block to finish so that it can start. The second solution is changing the inner block to async. Let's delete the attribute, and add async here, and run our code. As you can see, the outer block is not waiting for the inner block to complete in order for each to start.

Contents