O'Reilly logo

Advanced Mac OS X Programming: The Big Nerd Ranch Guide by Mark Dalrymple

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Complex-Lifetime Operations

MandelOpper used simple-lifetime operations, meaning that -main started, ran to completion, and exited. In Mac OS X 10.5, it is a non-concurrent operation and gets its own thread.

You may have operations that do work that is asynchronous in nature, such as accessing the network or waiting for data to arrive from a radiation detector. These operations could wait in -main, or they could be implemented as complex-lifetime operations that have more control over their lifetime.

In Mac OS X 10.5, you can create concurrent operations by overriding -isConcurrent and returning YES. This tells NSOperationQueue to start the operation in the current thread. In 10.6, the operation will be started in its own thread. The Cocoa ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required