O'Reilly logo

Mac® Application Development For Dummies® by Karl G. Kowalski

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

Chapter 9

Working in the Background

In This Chapter

arrow Understanding background operations

arrow Keeping your app’s events on schedule

arrow Using a thread to download web data

Every current Macintosh comes with several CPUs, each of which can perform independently of the others. The minimalist MacBook contains an Intel Core 2 Duo CPU; the beefiest Macintosh Pro comes with two separate six-core Intel CPUs (and yes, I dream about that one). OS X is written with multitasking in mind, and the apps you run on your Mac can take advantage of multiple CPUs without your having to tell them to do so. So iTunes is downloading tonight’s video while playing its theme song, your e-mail app is retrieving the latest messages from your office while you’re writing, and your web browser is displaying the new messages from your friends at your favorite social-networking site, while you’re translating some German.

Your Mac app can use all the CPUs on the machines where your users install it. Normally, your app will operate on just one CPU, submitting its programming instructions to the processor. But you can enhance your app’s performance, even while running on just one CPU, if you set up some of your code to operate ...

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