Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!samsung!usc!apple!claris!peirce From: peirce@claris.com (Michael Peirce) Newsgroups: comp.sys.mac.programmer Subject: Re: Need info on multitasking capabilities on the mac Message-ID: <10702@claris.com> Date: 28 Nov 89 22:29:17 GMT References: <6391@tank.uchicago.edu> <9072@hoptoad.uucp> <17247@dartvax.Dartmouth.EDU> <9080@hoptoad.uucp> <1250@smurf.ira.uka.de> Reply-To: peirce@claris.com (Michael Peirce) Organization: Claris Corporation, Santa Clara CA Lines: 43 In article <1250@smurf.ira.uka.de> urlichs@smurf.ira.uka.de (Matthias Urlichs) writes: >In comp.sys.mac.programmer tim@hoptoad.UUCP (Tim Maroney) writes: >< In article <17247@dartvax.Dartmouth.EDU> earleh@eleazar.dartmouth.edu >< (Earle R. Horton) writes: >< >< I thought that MultiFinder would refuse to context switch if the file >< or device system had any pending asynchronous requests. But maybe I'm >< thinking of an earlier incarnation. It's fairly painful to write a >< complete protocol scheduled from completion routines, but it can be >< done. >< >MF currently checks if the file manager is busy. The device manager is not >checked. So the file I/O requests occur on top of whatever application may be >running at the moment. No problem (but check if you have enough room on the >stack!) >I would not describe running a protocol from completion routines as painful. >It's more like a lot of typing. (I ought to know :-) -- my soon-to-be-released >AppleShare-compatible server works that way.) >-- >Matthias Urlichs I agree with Matthias, setting up a protocol that only depends on completion routines isn't really all that painful. You just have to understand how to program using state machines. Public Folder uses this model - everything done on the server side is 100% completion routines. It just sits there waiting for an incoming request, then hangs a read (say), then waits for it to complete, then sends it back, etc... [think about it, there's no App around for PF to be a part of!] Of course, PF is using ATP and the file system, but serial i/o should work the same. [actually you have to roll your own timeouts with the timeMgr, but again, not to hard to do.] Claris Corp. | Michael R. Peirce -------------+-------------------------------------- | 5201 Patrick Henry Drive MS-C4 | Box 58168 | Santa Clara, CA 95051-8168 | (408) 987-7319 | AppleLink: peirce1 | Internet: peirce@claris.com | uucp: {ames,decwrl,apple,sun}!claris!peirce