Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 5. Working with Blocks > Using Blocks with Threads

5.3. Using Blocks with Threads

I'm sure that you can think of many different uses for blocks in your code. I'm going to touch on a couple of them in the next few sections.

If you think about the way that blocks enable you to encapsulate functionality in your application in a nice neat package, functionality that can be easily reused, then it makes sense that one of the most commonly used design patterns for blocks in Objective-C is to provide code that can be run in parallel. In other words, threads.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial