Skip to content

Instantly share code, notes, and snippets.

@an01f01
Created February 26, 2025 03:02
Show Gist options
  • Save an01f01/a3842167fcd92e23ed0dff6d0b93670a to your computer and use it in GitHub Desktop.
Save an01f01/a3842167fcd92e23ed0dff6d0b93670a to your computer and use it in GitHub Desktop.
TThread.CreateAnonymousThread(procedure ()
var
I: Integer;
begin
TThread.Synchronize(nil,
procedure
begin
{ Update UI components at begining }
end
);
{ Method containing code to execute }
YourUiBlockingProcedure();
TThread.Synchronize(nil,
procedure
begin
{ Update UI components after completion }
end
);
end).Start;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment