M
matthiasjanes
Hi all,
I have a application where I use different threads. actually all is
working - BUT I just discovered that the CPU is always 100 % [/
b]used.
on the 32-bit machine athlon XP, as well as on the amd 64-bit AMD
Athlon(TM) 64 X2 Dual-Core.
I have to admit I'm not used to threads. I actually use a thirdparty
scheduler http://www.webwareforpython.org/TaskKit/Docs/Source/ Docs/TaskKit.Scheduler.html
but I checked and a very simple exampe with threading gives me also
all the time 100% CPU.
Does anyone know how to run this without consuming all CPU.
regards,
MJ
I have a application where I use different threads. actually all is
working - BUT I just discovered that the CPU is always 100 % [/
b]used.
on the 32-bit machine athlon XP, as well as on the amd 64-bit AMD
Athlon(TM) 64 X2 Dual-Core.
I have to admit I'm not used to threads. I actually use a thirdparty
scheduler http://www.webwareforpython.org/TaskKit/Docs/Source/ Docs/TaskKit.Scheduler.html
but I checked and a very simple exampe with threading gives me also
all the time 100% CPU.
Code:
import threading, time
class TestThread ( threading.Thread ):
def run ( self ):
print 'TEST'
t = TestThread()
t.start()
while (True):
pass
Does anyone know how to run this without consuming all CPU.
regards,
MJ