Hi
On Friday 25 February 2005 13:27, Florian Klaempfl wrote:
> While this is officially a beta, we believe that this version is release
> quality. We would very much like you download and install this version, and
> give any feedback regarding bugs and other issues.
Very little has changed about the problem with CheckSynchronize that I've
reported last month. It doesn't work (tested under Linux only). Attached a
test program again, that compiles under Kylix and works counting from 1 to
10, but loops forever when compiled by FPC 1.9.8
May I ask if this issue is considered not important, and FPC 2.0 will born
with this bug still unresolved?
Regards,
Pedro
program testsync;
{$ifdef FPC}
{$mode delphi}
{$endif}
uses Classes, SysUtils, {$ifdef FPC}cthreads,{$endif} Libc;
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.
_______________________________________________
fpc-pascal maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal