12. Threads
“Nice threads!”
—Some guy circa 1973
There was a time when computer programs ran from beginning to end with nary a surprise. If a program had 100 instructions, they would run in order, with the exception of loops and branches. No two instructions would execute at the same time. You could not be performing more than one task at the same time. Execution was serial; each command occurred one after the other.
The Macintosh operating system introduced us to the event driven programming model. A program's instructions would still occur in order, but this mechanism allowed the computer to spin its wheels until the user clicked the mouse or typed on the keyboard. When an event such as this occurred, the computer would react to it and draw ...
Get Mac OS® X Advanced Development Techniques 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.