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 ...

Get Objective-C Recipes: A Problem-Solution Approach 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.