If you have a thread which calls a function, AFAIK it's any global or VCL component calls which make it not thread safe right?
So if your thread called a method like
procedure UpdateRow()
begin
StringGrid1.AddRow(....);
end;
that is not thread safe. however if you have a method like this
function ParseXML(const XML : String) : string;
var
xml_parser : TXMLParser;
begin
xml_parser := TXMLParser.create;
... do stuff
result := xml_parser.something;
xml_parser.free;
end;
that is thread safe, as long as the TXMLParser is not doing anything unthread safe.
But if two threads call that method at the same time, it wont throw an exception as they both create their own instance of TXMLParser right? They get their own copy. Is that correct?
Hope that makes sense :)