diff --git a/.gitattributes b/.gitattributes index d4dcc2be59..05ddb93a73 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8105,6 +8105,7 @@ tests/webtbs/tw1096.pp svneol=native#text/plain tests/webtbs/tw10966.pp svneol=native#text/plain tests/webtbs/tw1097.pp svneol=native#text/plain tests/webtbs/tw10979.pp svneol=native#text/plain +tests/webtbs/tw11006.pp svneol=native#text/plain tests/webtbs/tw1103.pp svneol=native#text/plain tests/webtbs/tw1104.pp svneol=native#text/plain tests/webtbs/tw1111.pp svneol=native#text/plain diff --git a/tests/webtbs/tw11006.pp b/tests/webtbs/tw11006.pp new file mode 100644 index 0000000000..0deef4b064 --- /dev/null +++ b/tests/webtbs/tw11006.pp @@ -0,0 +1,39 @@ +{$mode objfpc} + +uses +{$ifdef unix} + cthreads, +{$endif} + sysutils, + classes; + +type + tmythread = class(tthread) + fs: ansistring; + constructor create(const s: ansistring); + procedure execute; override; + end; + +constructor tmythread.create(const s: ansistring); +begin + fs:=s+'a'; + freeonterminate:=true; + inherited create(true); +end; + +procedure tmythread.execute; +begin + sleep(60); + writeln('done'); +end; + +var + a: array[1..100] of tmythread; + i: longint; +begin + for i:=low(a) to high(a) do + a[i]:=tmythread.create('b'); + for i:=low(a) to high(a) do + a[i].resume; + sleep(60); +end.