M
muhx
Unregistered / Unconfirmed
GUEST, unregistred user!
有一段线程的执行代码
procedure TThreadReadData.Execute;
var
hEvent:Cardinal;
begin
hEvent:=CreateEvent(nil,True,False,nil);
while not Terminateddo
begin
Synchronize(ReadDate);
Synchronize(RefreshAlarmList);
SetDevList_No;
ResetEvent(hEvent);
WaitForSingleObject(hEvent,500);
end;
CloseHandle(hEvent);
end;
请帮我解释一下
ResetEvent(hEvent);
WaitForSingleObject(hEvent,500);
是什么含义,起什么作用,谢谢
procedure TThreadReadData.Execute;
var
hEvent:Cardinal;
begin
hEvent:=CreateEvent(nil,True,False,nil);
while not Terminateddo
begin
Synchronize(ReadDate);
Synchronize(RefreshAlarmList);
SetDevList_No;
ResetEvent(hEvent);
WaitForSingleObject(hEvent,500);
end;
CloseHandle(hEvent);
end;
请帮我解释一下
ResetEvent(hEvent);
WaitForSingleObject(hEvent,500);
是什么含义,起什么作用,谢谢