gabr42 / OmniThreadLibrary

A simple and powerful multithreading library for Delphi
http://www.omnithreadlibrary.com
Other
466 stars 142 forks source link

Error 1400 #173

Open chmichael opened 3 years ago

chmichael commented 3 years ago

Hello,

When i'm closing the application eg, after 30 seconds OTL will raise an exception with error code 1400 invalid window handle. Any ideas ?

var
  FTask1: IOmniTimedTask;
  FTask2: IOmniTimedTask;

procedure DoSometing1;
begin
end;

procedure DoSometing2;
begin
end;

procedure StartTimedTasks(const Task: IOmniTask);
begin
  FTask1 := Parallel.TimedTask.Every(1000).Execute(DoSometing1);
  FTask2 := Parallel.TimedTask.Every(1000).Execute(DoSometing2);
  FTask1.Start;
  FTask2.Start;
end;

procedure TForm8.FormCreate(Sender: TObject);
begin
  Parallel.Async(StartTimedTasks);
end;
chmichael commented 2 years ago

OTL-Error