O'Reilly logo

Objective-C Recipes: A Problem-Solution Approach by Matthew Campbell

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

Chapter    6

Asynchronous Processing

This chapter covers how to add costly tasks to your applications without interrupting the main thread of operations. Objective-C supports many different options to solve this problem and this chapter covers the three most important: NSThread, Grand Central Dispatch, and NSOperationQueue.

The recipes in this chapter will show you how to:

  • Create a new thread for a background process
  • Send messages to the main thread in order to update the user interface
  • Lock threads to keep data structures in sync
  • Use Grand Central Dispatch (GCD) to implement asynchronous processing
  • Use operation queues to implement asynchronous processing using a more object-oriented approach
  • Use serial queues to protect data structures without ...

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