Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!dog.ee.lbl.gov!nosc!baron!ryptyde!dant From: dant@ryptyde.UUCP (Daniel Tracy) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Amiga basher Message-ID: <60@ryptyde.UUCP> Date: 17 Jun 91 13:06:20 GMT References: <1991Jun13.065150.3529@cs.mcgill.ca> <1991Jun14.033035.21572@daimi.aau.dk> <56@ryptyde.UUCP> <1991Jun16.152251.17044@cunixf.cc.columbia.edu> Reply-To: dant@ryptyde.UUCP (Daniel Tracy) Organization: Ryptyde Timesharing (ryptyde.cts.com) Lines: 21 Responding to the following: " Macintosh multitasking requires the programmer to write their code in a very specific way. Additionally, the task you are interacting with gets the vast majority of time, even if it doesn't need it. Which needs the time more: Tetris or the compile job that is running in the background?" First off, nearly all applications written before Multifinder multitasked in it, and you DON"T have to "write your code in a very specific way". Anything that involves user interaction calls WaitNextEvent(), which does tell the OS that the app is waiting for user input and you should switch to the next app. WaitNextEvent() is called all the time, not just when apps are waiting for user input, because they always have to take user input into account. For example, during a lengthy operation, an application has to check to see if the user has clicked on the Cancel button. I KNOW Macintosh multitasking isn't pre-emptive and isn't priority-based, but it's there and available from all applications, although some (Hypercard, Stuffit Classic) take up a lot of processing power. And yes, foreground applications take up about twice as much processing power as background (I tested this), but that's cooperative multitasking for you.