Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!apple!keith From: keith@Apple.COM (Keith Rollin) Newsgroups: comp.sys.mac.programmer Subject: Re: DA loses resource file on accRun Keywords: MultiFinder DAs context switches Message-ID: <33407@apple.Apple.COM> Date: 24 Jul 89 02:47:33 GMT References: <1989Jul17.045641.20314@lth.se> <2932@internal.Apple.COM> <14573@dartvax.Dartmouth.EDU> <33359@apple.Apple.COM> <2808@murtoa.cs.mu.oz.au> Organization: Apple Computer Inc, Cupertino, CA Lines: 37 In article <2808@murtoa.cs.mu.oz.au> jkjl@murtoa.UUCP (John Keong-Jin Lim) writes: >In article <33359@apple.Apple.COM> keith@Apple.COM (Keith Rollin) writes: >>Background applications get the minor switch because they can be optimized >>for background time. First of all, background applications don't get null >>events unless the canBackground bit is set. > >There is a bit you can set in the dCtlFlags that allows you to >control whether accRun is called at all (this is from memory - I >dont have IM here, so i cant guarantee 100% accuracy). > >>Second, there is the 'sleep' >>parameter of WaitNextEvent. Both of these help prevent numerous minor > >DAs have the dCtlDelay to tell the DA how long to sleep. > >>switches. DA's don't have these options available to them, so saving time had >>to be done in this other way. > >What you said above just isnt true, Keith. Apple has provided ways of >making background tasks in DAs very friendly. Why not have a resource >in DAs like the sysz resource in inits to inform MF that it is friendly ?? Hmmm...that's what I get for talking about something I know very little about. Personally, I've never written a driver or DA. Nasty little things. I believe you are correct in the things you say. There's the 'drvrDelay' field and the 'dNeedTime' bit. There's even the accCursor message to take the place of mouseMoved events. I just tried forwarding on what I'd heard from someone else. I guess I'd better stick to answering MPW and MacApp questions... ------------------------------------------------------------------------------ Keith Rollin --- Apple Computer, Inc. --- Developer Technical Support INTERNET: keith@apple.com UUCP: {decwrl, hoptoad, nsc, sun, amdahl}!apple!keith "Argue for your Apple, and sure enough, it's yours" - Keith Rollin, Contusions