Synchronous programming is when the thread that initiated that operation will wait for the task to finish before continuing. Asynchronous programming is when the thread does not wait. The difference between the two is important for you to know because they can decide where to run slow or expensive processes.
- [Presenter] Suppose you have an app … that does intensive tasks such as image transformations … like filtering, tint or image downloading. … If you ran your code sequentially, … you will have a lot of disappointed users. … Naturally, you want an app that can perform several items … at once and who's UI update swiftly. … This is where learning … about asynchronous and synchronous programming comes in. … Asynchronous programming means executing multiple items … at the same time while synchronous programming … means executing items one at a time. … When you dispatch a task to grand central dispatch queue, … you can choose to have it executed asynchronously, … meaning it won't block the current queue, … the tasks will be started but the thread won't wait … until the task is finished … or it can dispatch synchronously … which blocks the current thread … until the task is finished. … In iOS, you can choose to dispatch … your work synchronously using DispatchQueue.async … into brackets execute or synchronously …
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.