Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
procedure TLinkThread.Execute;
begin
Event := CreateEvent(nil, True, False, nil);
MyObject := TMyObject.Create;
try
while not Terminated do
begin
Sleep(10); // prevent 100% cpu
DoSomeWork;
end;
finally
FreeAndNil(MyObject);
end;
SetEvent(Event); // inform thread creator we are done here
Sleep(100);
CloseHandle(Event);
end;