[fpc-devel] TThread.Terminate;

Martin fpc at mfriebe.de
Sat Aug 22 16:09:19 CEST 2020


procedure TThread.Terminate;
begin
   FTerminated := True;
end;

Should that not in some way deal with memory barriers? E.g. 
InterlockedExchange or similar?

And the same for the "Terminated" property, should that have a getter to 
do the same?

As it stands, afaik a thread could get the "Terminate" flag with an 
unknown delay?



More information about the fpc-devel mailing list