An open API service indexing awesome lists of open source software.

https://github.com/hemulgm/hgmasync

Async wrapper
https://github.com/hemulgm/hgmasync

async delphi tasks

Last synced: 7 months ago
JSON representation

Async wrapper

Awesome Lists containing this project

README

          

# HGMAsync
Async wrapper

### Samples
```Pascal
Async.Sync(GlobalWaitBegin);

Async.Run(
function: Boolean
begin
Result := LongWorkWithBooleanResult;
end,
procedure(Result: Boolean)
begin
try
if Result then
begin
ShowAllFine;
end
else
ShowError;
finally
GlobalWaitEnd;
end;
end);
```

```Pascal
Async.Run(ConnectChatAsync);
```

```Pascal
procedure TFormMain.LogAsync(const Text: string);
begin
Async.Sync(MemoLog.Lines.Add, FormatDateTime('HH:NN:SS.ZZZZZZ', Now) + #13#10 + Text);
end;
```

```Pascal
GlobalWaitBegin;
Async.Run(LoadServersAsync, GlobalWaitEnd);
```