Path: utzoo!attcan!uunet!decwrl!apple!claris!outpost.UUCP!peirce From: peirce@outpost.UUCP (Michael Peirce) Newsgroups: comp.sys.mac.programmer Subject: Re: True lightweight threads for the Mac? Message-ID: Date: 11 Oct 90 15:44:01 GMT Reply-To: gilstrap@pooh_corner.sbc.com (Brian R. Gilstrap) Organization: Peirce Software Lines: 28 X-Mailer: uMail - Mac Release: 0.1.4 In article <1990Oct9.161031.12927@swbatl.sbc.com>, gilstrap@pooh_corner.sbc.com (Brian R. Gilstrap) writes: > > Has anyone managed to get true lightweight threads going on the Mac? What > I mean is that the C++ "task" library (which last I knew didn't work under the > MacOS anyway) doesn't cut it. I'm looking for multiple threads of execution > within the same "address space" (which in the MacOS roughly corresponds to > "the same application heap(s)"). > > Barring that (and off the top of my head), is there anyone out there who > has thought much about using interrupts/VBL-stuff to force switching between > C++ "tasks". > > > Any other approach for solving this problem (other than "Wait for IAC") would > be greatly appreciated. I doubt it would satisfy you, but I've found MacApp idlers to work well as a mechanism for executing multiple "tasks" at one time. You do have to "cooperate", that is you have to give up control. But given the right structuring, I've been able to create tasks to service incoming requests. I just create the idler object, tell it what to respond to, and that's the last I bother with it. It runs until completion with as many other idlers as need be. I'm not sure how IAC will help you... -- michael -- Michael Peirce -- {apple,decwrl}!claris!outpost!peirce -- Peirce Software -- Suite 301, 719 Hibiscus Place -- Macintosh Programming -- San Jose, California 95117 -- and Consulting -- (408) 244-6554