summaryrefslogtreecommitdiff
path: root/fpcsrc/tests/webtbs/tw3751.pp
blob: 1fa543fbb1f18037751ffd61d0de0a9c7d013bcd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{ Source provided for Free Pascal Bug Report 3751 }
{ Submitted by "Nicola Lugato" on  2005-03-05 }
{ e-mail: msx_80@hotmail.com }
{$mode delphi}
program turn;

uses
{$ifdef unix}
  cthreads,
{$endif}
  classes, sysutils;

type

Tmy = class(TThread)
constructor Create(suspended:boolean);
Procedure Execute;override;
end;

constructor TMy.Create(suspended:boolean);
begin
FreeOnTerminate:=true;
inherited Create(suspended);
end;

Procedure TMy.Execute;
begin
writeln('Just print and exit!');
end;

var m:TMy;
begin
m:=Tmy.create(true);
m.resume;
sleep(1000);
end.