Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Spinning spinning spinning' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Spinning spinning spinning
Authored by: thinkyhead on Dec 04, '01 10:27:11PM
Spinning the CPU is *very bad* under a pre-emptive multitasking, but most older Mac programs are notorious for doing this. Procedures like this are common in MacOS code:
while (!button())
{
  // do something
}
In a cooperative multitasking environment this code is bad because it completely blocks other processes from running. Under PMT this kind of code is worse because it steals cycles away from other programs, wastes CPU cycles, and noticeably shortens the life of batteries in laptops. MS can easily fix this by "sleeping" the application when it's in the "background." Let's hope they do!

[ Reply to This | # ]