grg@beta.lanl.gov (Galen Gisler) (03/23/89)
Greetings: I have a Macintosh program that does extensive computational work, but supports interrupts (it is a simulation code for a charged particle in an arbitrary electric and magnetic field), and I would like to have it run in background under MultiFinder. I don't have access to the relevant Tech Notes, so no doubt I am asking a question that is answered in one of them. The beginning of my Main Event Loop looks like this: Repeat {main event loop} SystemTask; ComputationTask; If GetNextEvent(everyEvent, theEvt) Then Case theEvt.what Of &c. The procedure ComputationTask checks the value of a global variable that determines the status of the ongoing computation, and calls the appropriate physics routines accordingly. I get the feeling that I'm supposed to call WaitNextEvent instead of GetNextEvent, but I don't know what the arguments are, and that I'm supposed to do something with the SIZE resource, but fiddling with that alone brings me bombs on transfer. Please help! Galen Gisler Space Plasma Physics Los Alamos National Lab (SPAN) ESSDP2::090091 (bitnet) GRG@LANL.GOV