* made the test threadsafe :)

This commit is contained in:
Jonas Maebe 2002-11-07 15:01:45 +00:00
parent 4e8a1790e6
commit 1144e7ccce

View File

@ -3,6 +3,8 @@
{$mode objfpc}
{$threading on}
uses sysutils;
const
threadcount = 100;
stringlen = 10000;
@ -23,7 +25,7 @@ function f(p : pointer) : longint;
inc(thri);
end;
writeln('thread ',longint(p),' finished');
inc(finished);
InterLockedIncrement(finished);
f:=0;
end;