mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-02 10:49:33 +01:00
* initial revision
This commit is contained in:
parent
417e589ad4
commit
c905878b67
26
tests/test/tmt1.pas
Normal file
26
tests/test/tmt1.pas
Normal file
@ -0,0 +1,26 @@
|
||||
{ %version=1.1 }
|
||||
|
||||
const
|
||||
threadcount = 100;
|
||||
finished : longint = 0;
|
||||
|
||||
function f(p : pointer) : longint;
|
||||
var
|
||||
s : ansistring;
|
||||
i : longint;
|
||||
begin
|
||||
for i:=1 to 1000000 div threadcount do
|
||||
s:=s+'1';
|
||||
inc(finished);
|
||||
end;
|
||||
|
||||
var
|
||||
i : longint;
|
||||
|
||||
begin
|
||||
for i:=1 to threadcount do
|
||||
BeginThread(@f);
|
||||
while finished<threadcount do
|
||||
;
|
||||
writeln(finished);
|
||||
end.
|
||||
Loading…
Reference in New Issue
Block a user