Couple of newbie questions...
chris liechti
cliechti at mails.ch
Thu Jul 26 22:56:53 EDT 2001
time.sleep does give time bac to the system. just avoid value smaller that
0.03. my windows freaked out and showed processor usage on other processes
when i used sleep(0.01) but larger values work as expected.
chris
foobarickknob at yahoo.com (Scott Taylor) wrote in
news:5a140c6d.0107261705.3a4f7db3 at posting.google.com:
>
> 1) time.sleep doesn't seem to release time back to the Win32
> subsystem. I had a tight loop, and CPU was maxed out at 100% even if
> I did a PumpWaitingMessages w/ a time.sleep. To actually get the loop
> to return slices of time back to windows and not max out the CPU I had
> to do a PumpWaitingMessages followed by a win32api.Sleep(0) call. My
> question is - shouldn't time.sleep actually make the process sleep w/o
> hogging CPU?
>
--
chris <cliechti at mails.ch>
More information about the Python-list
mailing list