Go Up to Error and Warning Messages (Delphi)
The compiler does not allow initialization of thread local variables.
program Produce;
threadvar
tlsย : Integer = 151;
begin
end.
The declaration and initialization of 'tls' above is not allowed.
program Solve;
threadvar
tlsย : Integer;
begin tlsย := 151;
end.
You can declare thread local storage as normal, and then initialize it in the initialization section of your source file.