Article View: comp.sys.powerpc
Article #3058Re: Debate: PowerMac "trounces" Pentium....???
From: Kenneth Jason Fair
Date: Mon, 05 Feb 1996 06:34
Date: Mon, 05 Feb 1996 06:34
61 lines
3897 bytes
3897 bytes
[the "infinite loop" program discussed]
>I wrote:
>: And again, so what? If I hit my computer with a sledgehammer, it
>: won't work at all. That's why I don't go around hitting my computer
>: with sledgehammers.
>:
>: Does cooperative multitasking allow you to run more than one program at
>: the same time? Yes. Does preemptive multitasking do it better?
>: Perhaps, depending on the situation and the programs involved.
>: Can I get my work done either way? Yes.
>
In article <19960201.11A2980.E21F@olympus.net>, dons@olympus.net (Don
Schmelling) wrote:
>And once again, I must ask the question, but how are you runing more than
>one program at once in a cooperative multitasking system, while a program
>like that one is being run. The program never tells the os it is done
>with the cpu and just uses up all of the cpu. If you are only running one
>task that gets all of the cpu then you are not multitasking.
Maybe you're interested in running infinite loop programs like that on
your machine, but I can't think of a single instance where I've needed
to. I'm interested in using software that actually has a point.
Here's what you have to do to make your program multitaskable on the Mac:
1) Call the OS routine WaitNextEvent. This is the same routine that
returns the next event for you to process, so that you can tell if
the user hit a key, moved the mouse, etc.
That's it. You can also add some code to make your program do something
if it is being switched to the foreground/background, but even that's
not really necessary. It's really that simple. It's well explained
in Chapter 9 of the book _Inside_Macintosh:_Overview_, Apple's
introductory reference book for programming the Mac.
Actually, for most Mac programs, it'd be hard to AVOID multitasking the
program. Any program that checks for input or OS events goes through
WaitNextEvent. I suppose you could go around it, but you'd have to
reengineer large chunks of the OS for no real reason that I can see.
I dislike it when people say things like "The Mac can't multitask,"
because others who don't know any better and don't know the difference
between CM and PM assume that this statement means, "The Mac can't
run more than one program at a time," something which is patently false,
especially when compared to any sort of Wintel multitasking. All I
know is, I can have a newsreader running with a couple of decoder
programs in the background, be making FTP transfers, have a graphic
viewer open, be writing up a letter, and copy some stuff from one
drive to the other all at the same time without a hitch. And that's
all that matters to me.
--
KEN FAIR - U. Chicago Law | Power Mac! | Net since '90 | Net.cop
kjfair@midway.uchicago.edu | CABAL(tm) Member | I'm w/in McQ - R U?
** Fuck the Communications Decency Act of 1996. **
Why does George Carlin determine the seven words I cannot say?
Technical Details
Message-ID:
<kjfair-0502960034100001@ngrh-34.rh.uchicago.edu>Path:
arc1-ca.pugleaf.net!ngrh-34.rh.uchicago.edu!userReferences:
<4csn1n$klb@macshack.com> <DKxzFK.2r6@eskimo.com> <4d3m6o$bb6@macshack.com> <4d428mINNe14@anaconda.cis.ohio-state.edu> <4d9ui4$e63@macshack.com> <david-1401960302090001@s245_7.resnet.ucla.edu> <1996Jan26.192156@eigb> <jragosta-2601961539320001 <19960201.11A2980.E21F@olympus.net>Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.powerpc,comp.os.linux.advocacy,comp.sys.mac.advocacy,comp.os.os2.advocacy,comp.sys.amiga.advocacy,comp.sys.intel Path: arc1-ca.pugleaf.net!ngrh-34.rh.uchicago.edu!user From: kjfair@midway.uchicago.edu (Kenneth Jason Fair) Subject: Re: Debate: PowerMac "trounces" Pentium....??? X-Nntp-Posting-Host: ngrh-34.rh.uchicago.edu X-Kook-Number-2: 5 Message-ID: <kjfair-0502960034100001@ngrh-34.rh.uchicago.edu> X-Kook-Code-2: (Grubor++)*2 Boursy+ Sender: news@midway.uchicago.edu (News Administrator) Organization: University of Chicago School of Law X-Newsreader: Yet Another NewsWatcher 2.1.8 References: <4csn1n$klb@macshack.com> <DKxzFK.2r6@eskimo.com> <4d3m6o$bb6@macshack.com> <4d428mINNe14@anaconda.cis.ohio-state.edu> <4d9ui4$e63@macshack.com> <david-1401960302090001@s245_7.resnet.ucla.edu> <1996Jan26.192156@eigb> <jragosta-2601961539320001 <19960201.11A2980.E21F@olympus.net> Date: Mon, 5 Feb 1996 06:34:10 GMT