[win32] Busy-loop in win32\Demos\dde\ddeserver.py
Mark Hammond
mhammond at skippinet.com.au
Tue Jan 21 23:52:26 EST 2003
Peter Åstrand wrote:
> 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?
Sure - why not. Let me know if it works <wink>.
> I also wonder if/how it's possible to combine a DDE server and client into
> one single application.
No idea :(
Mark.
More information about the Python-list
mailing list