In the TThread
class there is a class member (property) named Terminated
.
There is also an procedure Terminate;
which merely sets Terminated
to True
.
When we inherit from TThread
there are some cases where we check for terminated. The following pool/loop is just to demonstrate a possible situation:
while not Terminated do
begin
Work;
end;
What is the garantee that terminated will never be cached by the processor?