Exercises

  1. Rewrite WordCounter’s -countWords: method to return its value in a way other than a struct. How does that affect the memory management that was done in the main queue block? Is the rewritten version cleaner and easier to understand than the original version?

  2. Do more word analysis calculations in WordCounter. Display the word frequencies in a tableview. Hit the network and download definitions of words. Or hit the network and download images from Google Image Search and display them in a tableview.

  3. What happens if a serial queue is made to target itself?

  4. What happens if you create a target queue cycle between two or more serial queues? Start by creating two serial queues and setting each to target the other. Enqueue a work item ...

Get Advanced Mac OS X Programming: The Big Nerd Ranch Guide 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.