<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I have a thread that sits in the background waiting
for input from a COM port. the execute method simple has these two
lines:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> while not Terminated
do<BR> Application.ProcessMessages;<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>The problem with this is that the processor usage
is very high, even if the thread is doing nothing but sitting there calling
processmessages.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>The main application thread doesn't have this
problem, yet it also has a message handling routine. </FONT><FONT face=Arial
size=2>Is there a way to avoid this problem in threads?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Cheers,</FONT></DIV>
<DIV><FONT face=Arial size=2>Phil.</DIV></FONT></BODY></HTML>