Test suite results for test file webtbs/tw3695.pp

Test run data :

Run ID:
Operating system: win32
Processor: i386
Version: 3.3.1
Fails/OK/Total: 36/9668/9704
Version: 3.3.1
Full version: 3.3.1-15624-g3cfec5e
Comment: -Aas -al -Xe -Fd
Machine: windows-xp-32
Category: 1
SVN revisions: e601156:3cfec5e:7629cdb:6a10963
Submitter: pierre
Date: 2024/04/28 02:24:00 <> 2024/04/27
Previous run: 940006
Next run: 941521

Hide skipped tests

Hide successful tests

Test file "webtbs/tw3695.pp" information:

t_id 1504
t_adddate 2005/03/05
t_result 0
t_knownrunerror 0

Detailed test run results:

tr_idruntr_oktr_skiptr_result
479730383940787TrueFalseSuccessfully run

Record count: 1

No log of 940787.

Source:

{ Source provided for Free Pascal Bug Report 3695 }
{ Submitted by "Pedro Lopez-Cabanillas" on  2005-02-25 }
{ e-mail: plcl@telefonica.net }
program testsync;

{$ifdef FPC}
    {$mode delphi}
{$endif}

uses Classes, SysUtils
{$ifdef unix}
,cthreads
{$endif unix}
;

type
    Tester = class
    private
	counter: Integer;
    public
	procedure count;
	procedure run;
    end;

    MyThread = class(TThread)
    private
        worker: Tester;
    public
	constructor Create(w: Tester);
	procedure Execute; override;
    end;

constructor MyThread.Create(w: Tester);
begin
  worker:= w;
  inherited Create(false);
end;

procedure MyThread.Execute;
begin
  WriteLn('Starting MyThread.Execute');
  repeat
    Synchronize(worker.count);
  until Terminated;
  WriteLn('Ending MyThread.Execute');
end;

procedure Tester.count;
begin
  Inc(counter);
  WriteLn(counter);
end;

procedure Tester.run;
var
  thread: MyThread;
begin
  thread := MyThread.Create(Self);
  While counter < 10 do
  begin
    Sleep(100);
    CheckSynchronize;
    //WriteLn('Loop forever inside Tester.run when compiled by FPC 1.9.8');
  end;
  thread.Terminate;
end;

var
    t: Tester;
begin
    t := Tester.Create;
    t.run;
end.

Link to SVN view of webtbs/tw3695.pp source.