Ich bin relativ neu in Delphi und probiere mich grade an multi threading.
Wieso gibt der Folgende code 2 mal "Test" in der Konsole aus?
Code:
type
TSelfThread = class(TThread)
procedure Execute; override;
end;
procedure TSelfThread.Execute;
begin
Writeln('Test');
end;
var
SelfThread: TSelfThread;
begin
try
SelfThread := TSelfThread.Create(false);
except
on E:
Exception do
Writeln('Error');
end;
end.