Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!wuarchive!cs.utexas.edu!texbell!ficc!peter From: peter@ficc.ferranti.com (Peter da Silva) Newsgroups: comp.arch Subject: Re: Macintosh OS Message-ID: Date: 9 Jun 90 13:36:49 GMT References: <1990Jun7.212351.20426@calgary.uucp> <8767@odin.corp.sgi.com> Reply-To: peter@ficc.ferranti.com (Peter da Silva) Organization: Xenix Support, FICC Lines: 18 In article <8767@odin.corp.sgi.com> mattly@aldur.sgi.com (James Mattly) writes: [ have the compiler insert GetNextEvent ] > every n lines of code. Or inside a loop (not a time critical one!). What if the time-critical loop is long-running? Like, in a ray-tracer? It might be reasonable to check after each scanline, but every pixel is probably too often. A high-resolution tracer can take a significant amount of time to do that... Sure, there are tradeoffs. But how is the compiler to figure them out? > This approach wins for the programmer who doesn't want to "break" his > train of thought while writing a peice of code. It also wins for the Mac OS > which lets the programmer decide when a context switch would be a good idea > (IMHO, the best reason for Cooperative Multitasking). But the programmer *isn't* deciding when a context switch would be a good idea! The compiler is. -- `-_-' Peter da Silva. +1 713 274 5180. 'U` Have you hugged your wolf today? @FIN Dirty words: Zhghnyyl erphefvir vayvar shapgvbaf.