-   Programming (
-   -   Limit Cpu Use Of Threads (

yakotey 10-03-2005 07:00 AM

Limit Cpu Use Of Threads

i have a problem : my c++ application is sometimes using 99 up to 100% of the CPU.

How can i limit this to 50% max?

thanks for any help.

jim mcnamara 10-03-2005 09:12 AM

If there are no other processes on the system that are active, this may be okay.

The best starting place is to alter prioirty before you try setrusage(). You can use nice to be sure that when your prgram is running and top shows it using lots of cpu, it is not competing with anyone else.

All times are GMT -5. The time now is 04:58 AM.