Chapter 13. Blocks and Grand Central Dispatch


This chapter covers
  • Understanding block syntax
  • Handling memory management
  • Using blocks in system frameworks
  • Learning Grand Central Dispatch
  • Performing work asynchronously


Have you ever been to New York City’s Grand Central Terminal? It’s a huge place with trains arriving and departing constantly. Imagine having to manage such an operation by hand—Which train should come in on which track? Which one should change tracks at what time? Which engine should be attached to which train?—and so on and so forth. You’d probably quit your job after 30 minutes and go back to programming!

Being a programmer, however, you might find yourself in a similar situation when you have to write a multithreaded ...

Get Objective-C Fundamentals now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.