On 06/30/2011 01:53 PM, Lukasz Sokol wrote:

AFAIR, code (whatever way you write it) can either BE safe or NOT, no
half measyres here - any one of the 'properties' vel 'aspects' not
complied with, and you can't name your code thread-safe.
A function easily can be thread safe _only_ if a parameter of same is different for each thread:

var
 a array [0...10] of Integer;
Function x(i);
begin
  a[i] := a[i] + 1;
end;

A very likely case with the hidden self parameter of class instances.

-Michael

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to