The main queue is provided by the main thread and is where all UI updates happen. You should know about main queues because it helps you learn how to push code onto the main thread.
- [Instructor] Grand central dispatch provides three Queues … for us to work with. … One of them is the main queue. … When you create an application, … a main thread is created too … and it's associated with your application. … You only get one main thread in an application … and this is why the main thread has the highest priority, … when you talk about QoS Quality of Service in queues. … You may have seen the main queue in action already. … If you look at the app delegate file … that is automatically created with the new project, … just before the class declaration, … we have @UI Application Main. … This is one of the ways we execute code … on the main queue. … App delegate is the root of your app … and your app can't run without it. … It's there to handle the life cycle of your app. … Another way to execute code on the main thread … is by calling DispatchQueue.main.async. … As a role, all UI updates should be made on the main queue. … If not the user experiences lagging in the app. …
Skill Level Intermediate
1. Evolution of GCD
2. Working with Queues
3. Asychronous vs. Synchronous Execution
4. Concurrency vs. Parallelism
What are deadlocks?1m 21s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.