[win32] Busy-loop in win32\Demos\dde\ddeserver.py

Peter Åstrand peter at cendio.se
Tue Jan 21 08:23:11 EST 2003


I need to use DDE as a IPC mechanism, and looked at the examples 
ddeclient.py and ddeserver.py. I've noticed that when running 
ddeserver.py, this process uses 99% CPU; goes into a tight loop round:

while 1:
	win32ui.PumpWaitingMessages(0, -1)

Is this really intended? How can I make the thread sleep until any new 
event is recieved, can I use win32event.MsgWaitForMultipleObjects?

I also wonder if/how it's possible to combine a DDE server and client into 
one single application. 

Thanks, 
-- 
Peter Åstrand                Telephone: +46-13-21 46 00
Cendio Systems               E-mail: peter at cendio.se
Teknikringen 3
583 30 Linköping








More information about the Python-list mailing list