Catalog · How the catalog works
HGMAsync
Async wrapper
- ★ 8 on GitHub
Anyone may press Interesting, signed in or not. It helps others find this project.
README
HGMAsync
Async wrapper
Samples
Async.Sync(GlobalWaitBegin);
Async.Run<Boolean>(
function: Boolean
begin
Result := LongWorkWithBooleanResult;
end,
procedure(Result: Boolean)
begin
try
if Result then
begin
ShowAllFine;
end
else
ShowError;
finally
GlobalWaitEnd;
end;
end);Async.Run(ConnectChatAsync);procedure TFormMain.LogAsync(const Text: string);
begin
Async.Sync<string, integer>(MemoLog.Lines.Add, FormatDateTime('HH:NN:SS.ZZZZZZ', Now) + #13#10 + Text);
end;GlobalWaitBegin;
Async.Run(LoadServersAsync, GlobalWaitEnd);
