O'Reilly logo

iOS Programming: The Big Nerd Ranch Guide by Aaron Hillegass, Christian Keur

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 (user interface) thread, because any code that modifies the UI must run on the main thread.

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required