ImageEn, unit imageenio

TImageEnIO.AsyncRunning

TImageEnIO.AsyncRunning


Declaration

property AsyncRunning: Integer;


Description

Returns the number of threads that are running.

See also: AsyncMode


Example

// Multi-threaded saving
Var
  bmp: TIEBitmap;
  io: TImageEnIO;
Begin
  bmp := TIEBitmap.Create;
  io  := TImageEnIO.CreateFromBitmap(bmp);

  io.LoadFromFile('C:\input.bmp');
  io.AsyncMode := True;  // So it will create a thread for each input/output task
  io.SaveToFile('D:\i1.jpg');  // thread 1
  io.SaveToFile('D:\i2.jpg');  // thread 2
  io.SaveToFile('D:\i3.jpg');  // thread 3

  // waits all threads finish
  io.WaitThreads();

  Other code...