Skip to content

dkstar88/AsyncTask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AsyncTask

Easy to use Asynchronous Task creation library

Features

  • Create threading task with single function call
  • Utilises anoymous procedure
  • Ready to use AsyncHTTPTask, AsyncHTTPTaskBitmap

Demo Codes

This code, sleeps for 5 seconds, and shows message box.

Run(TAsyncTask,
  // Execute
  procedure (ATask: IAsyncTask)
  begin
    Sleep(5*1000);
  end,
  // Finish
  procedure (ATask: IAsyncTask)
  begin
      ShowMessage('Finished');
  end
);

This code downloads google's logo png file, and displays in TImage component

AniIndicator1.Visible := True;
Run(THttpAsyncTaskBitmap.Create('http://www.google.com/images/nav_logo129.png'),
  // Finish
  procedure (ATask: IAsyncTask)
  begin
    Image1.Bitmap := (ATask as IHttpBitmapResponse).Bitmap;
    AniIndicator1.Visible := False;
  end
);

About

Easy to use Asynchronous Task creation library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published