Browse Source

* fixed race condition

florian 20 years ago
parent
commit
9fba928b62
1 changed files with 5 additions and 3 deletions
  1. 5 3
      tests/webtbs/tw3695.pp

+ 5 - 3
tests/webtbs/tw3695.pp

@@ -64,11 +64,13 @@ begin
     //WriteLn('Loop forever inside Tester.run when compiled by FPC 1.9.8');
     //WriteLn('Loop forever inside Tester.run when compiled by FPC 1.9.8');
   end;
   end;
   thread.Terminate;
   thread.Terminate;
+  thread.waitfor;
 end;
 end;
 
 
 var
 var
-    t: Tester;
+  t: Tester;
 begin
 begin
-    t := Tester.Create;
-    t.run;
+  t:=Tester.Create;
+  t.run;
+  t.free;
 end.
 end.