Android and Application.ProcessMessages

  

i have application where I’m using form as message box,
in this “message box” i run thread that changing messages on it
and after thread finish, on message box i show buttons, only after clicking on button code can continue

var
FStart: TFStart;
VariableX:Boolean;

implementation

uses UApp,UMess;
{$R *.fmx}

procedure TFStart.Button2Click(Sender: TObject);
begin
VariableX:=false;
{
There i show window and start thread
after finish thread set VariableX as true
and close form
}
// There i need to wait until thread finish
while VariableX = false do Application.ProcessMessages;
{
there i will continue to work with data returned by thread
}
end;

I know that Marco Cantu say that its not good idea to use Application.ProcessMessages
In my case application stop with sigterm (On windows and ios its working good)

How to do it without Application.ProcessMessages?

Comments are closed.