Re: Multitasking in Mac OS Gets 100% CPU

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

The following naive implementation of get_key with multitasking support causes 100% CPU in Mac OS (Mountain Lion, Eu 4.0.4). Is there a better practice? This does not cause high CPU usage in Windows 7.

Is there something I can do in Mac OS to reduce the CPU consumption?

It's hard to say without seeing more of your code. Where does execution go when you call task_yield()? get_key() returns immediately. There's nothing there really that would lead me to believe that you'd get anything but 100% utilization until a key is pressed.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu