The Main Thread

Modern iOS devices have multicore processors that enable them to run multiple chunks of code simultaneously. These computations proceed in parallel, so this is referred to as parallel computing. When different computations are in flight at the same time, this is known as concurrency, and the computations are said to be happening concurrently. A common way to express this is by representing each computation with a different thread of control.

So far in this book, all of your code has been running on the main thread. The main thread is sometimes referred to as the UI thread, because any code that modifies the UI must run on the main thread.

When the web service completes, you want it to update the image view. ...

Get iOS Programming: The Big Nerd Ranch Guide, 6th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.