[EMAIL PROTECTED] wrote:
> I understand, that what I suggest does not solve the problem you want,
> but..
>
> Why do you want to restrict CPU usage to 30%? In Windows I run CPU
there might be three reasons:
1) less power consumed (notebooks, PDA's)
2) less heat from CPU
3) (cross platform) schedu
I understand, that what I suggest does not solve the problem you want,
but..
Why do you want to restrict CPU usage to 30%? In Windows I run CPU
intesive therads on IDLE priority, while interfacand/or communication
threads run on normal. This gives me best of two worlds:
1. I use 100% CPU (good) an
rbt wrote:
> [EMAIL PROTECTED] wrote:
>> finished = False
>> while not finished:
>
> Why don't you just write 'while True'??? 'while not false' is like
> saying 'I am not unemployed by Microsoft' instead of saying 'I am
> employed by Microsoft'. It's confusing, complex and unnecessary. Lawyers
"mmf" <[EMAIL PROTECTED]> writes:
> How can I make sure that a Python process does not use more that 30% of
> the CPU at any time. I only want that the process never uses more, but
> I don't want the process being killed when it reaches the limit (like
> it can be done with resource module).
>
> C
On 2005-05-27, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>>> How can I make sure that a Python process does not use more that 30% of
>>> the CPU at any time. I only want that the process never uses more, but
>>> I don't want the process being killed when it reaches the limit (like
>>> it can be
[EMAIL PROTECTED] wrote:
> rbt <[EMAIL PROTECTED]> wrote:
>
>>mf wrote:
>>
>>>Hi.
>>>
>>>My problem:
>>>How can I make sure that a Python process does not use more that 30% of
>>>the CPU at any time. I only want that the process never uses more, but
>>>I don't want the process being killed when it
> Are you looping during a cpu intensive task? If so, make it sleep a bit
> like this:
>
> for x in cpu_task:
> time.sleep(0.5)
> do(x)
No, I don't use an intensive loop. I have about 1200 lines of code
inside a process - is there nothing like
xyz.setlimit(xyz.cpu, 0.30)
???
Thank.
M
rbt <[EMAIL PROTECTED]> wrote:
>
> mf wrote:
>> Hi.
>>
>> My problem:
>> How can I make sure that a Python process does not use more that 30% of
>> the CPU at any time. I only want that the process never uses more, but
>> I don't want the process being killed when it reaches the limit (like
>> it
mf wrote:
> Hi.
>
> My problem:
> How can I make sure that a Python process does not use more that 30% of
> the CPU at any time. I only want that the process never uses more, but
> I don't want the process being killed when it reaches the limit (like
> it can be done with resource module).
>
> C
Hi.
My problem:
How can I make sure that a Python process does not use more that 30% of
the CPU at any time. I only want that the process never uses more, but
I don't want the process being killed when it reaches the limit (like
it can be done with resource module).
Can you help me?
Thanks in ad
10 matches
Mail list logo