http://wenku.baidu.com/view/89f37343a8956bec0975e309.htmlprocedure g_ReadThread.Execute;
begin
while true do
begin
try
if (self.Terminated = true) then
break;
// 避免线程占用太多CPU
Windows.Sleep(15);
// if not NotReadData() then Continue;
// ModemData:= GetNextData();
// if ModemData = nil then Continue;
Synchronize(RefreshMainForm);
except
break;
end;
end;
end;