Hi,
does anyone know why creating a new thread breaks DebugLn? (till the
execution returns to the JVM, Android, emulator, x86, )
This for example prints only "Started" to the log nothing else.
But the thread is called and executed correctly (otherwise it would stay
forever in the waiting part)
var threadActivated: boolean = false; //global variable
procedure testCalledByJVM;
begin
DebugLn('Started');
TTestThread.Create(false);
DebugLn('Waiting');
while not threadActivated do begin sleep(200); DebugLn(' .. Waiting
.. '); end;
debugln('Done');
end;
type
TTestThread = class(TThread)
procedure Execute; override;
end;
procedure TTestThread.Execute;
begin
debugln('THREAD TEST'); //including/excluding this line has no effect
threadActivated:=true;
end;
Benito
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus