mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 08:29:29 +02:00
Better for for checkcontrolmessage, based on Mattias Gaertner tip
git-svn-id: trunk@9268 -
This commit is contained in:
parent
efdddfd82c
commit
a8eb62ff54
@ -1137,10 +1137,7 @@ begin
|
||||
if not FDaemon.Execute then
|
||||
begin
|
||||
While Not Terminated do
|
||||
begin
|
||||
CheckControlMessage(True);
|
||||
Sleep(50);
|
||||
end;
|
||||
CheckControlMessage(False);
|
||||
end;
|
||||
end;
|
||||
|
@ -112,6 +112,8 @@ end;
|
||||
|
||||
procedure TDaemonThread.CheckControlMessage(WaitForMessage : Boolean);
|
||||
begin
|
||||
If WaitForMessage then // Don't hog CPU.
|
||||
Sleep(50);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user