Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!apple!lsr From: lsr@Apple.COM (Larry Rosenstein) Newsgroups: comp.sys.mac.system Subject: Re: Preemption good, time-slicing bad (was Re: All about sys 7.0 ) Message-ID: <12865@goofy.Apple.COM> Date: 2 Apr 91 02:30:04 GMT References: <1CE00001.bmpkbkz@tbomb.ice.com> Organization: Apple Computer, Inc. Lines: 28 In article <1CE00001.bmpkbkz@tbomb.ice.com> time@ice.com writes: > > >The problem, in the Macintosh case, is that processes do not "block" >like UNIX processes, they "event loop". This is why the majority of This isn't true. Programs can specify (in their calls to WaitNextEvent) the conditions under which they need the CPU. Until one of those conditions is met, the program takes no CPU time. The conditions are expressed in the form of: (1) a set of event types in which the program is interested, (2) a screen region for tracking the mouse, and (3) a timeout. If the mouse region is specified, MultiFinder will generate a mouse moved event if the mouse is outside the region. This is used so the application can change the cursor shape. The timeout is used for periodic actions such as blinking the insertion point. Assuming that programs pass the right values to WaitNextEvent, then they don't take any CPU time unless they have something to do (process an event, change the cursor shape, blink the insertion points, etc.). -- Larry Rosenstein, Object Specialist Apple Computer, Inc. 20525 Mariani Ave, MS 3-PK Cupertino, CA 95014 AppleLink:Rosenstein1 domain:lsr@Apple.COM UUCP:{sun,voder,nsc,decwrl}!apple!lsr