Re: Multitasking in Mac OS Gets 100% CPU

new topic     » goto parent     » topic index » view thread      » older message » newer message
ghaberek said...
mattlewis said...

In short, I don't think there is really any problem here. A busy loop should produce 100% CPU usage.

While I agree that a simple busy loop should produce 100% CPU usage, I think that a tasking loop with regular calls to sleep() should not, since the OS has the opportunity to schedule other programs.

Well, yes, there's that. Looking deeper, I suspect that Jim is right about the busy loop for sleeps of less than a second being a DOS hold over, since nanosleep() and Windows' sleep() work with fractional seconds.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu