---

SunWorld: Programming events: An event-based programming tutorial

How do you do three things at once? If you’re like a
computer (or most people, for that matter) you schedule your jobs
— that is, you set up some system to work on different tasks so
they don’t stall each other out….

“A related concept familiar to early users of Mac OS and
Microsoft Windows is that of cooperative multitasking, in which an
executing job continues to execute until it explicitly surrenders
control. While the infrastructure for this system is easier to
engineer, the consequence for users is that an improperly written
program can freeze the system.”

“Deciding which multitasking model is best for you depends on
the hardware, operating system, and programming-language support
available. And, most importantly, it depends on the programmer.
Different models lead to different styles of programming, and a
programmer’s comfort level with a particular style often is more
important than the efficiency of the underlying
implementation.”


Complete Story