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.

What are async and sync programming?

What are async and sync programming?

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

Start my 1-month free trial

What are async and sync programming?

- [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…

Contents