Chapter    8

Concurrency

User experience is extremely dependent on responsive applications. In order to create a fluid and smooth experience for your users, asynchronous operations are required. Users expect an application to be responsive, even during long-running operations such as network access or processing-intensive operations. This chapter covers recipes about threading and concurrency using Swift. There are three approaches to threading in iOS and OS X: NSThread, Grand Central Dispatch, and NSOperationQueue. This chapter covers the following, including those approaches:

  • Threading with NSThread
  • Synchronizing Threads
  • Using Grand Central Dispatch for Threading
  • Using NSOperations and NSOperationsQueue
  • Completing Tasks in the Background ...

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