I have a windowless application with integrated UniGui and I need it to close from one of its threads.
Without UniGUI I didn't use Application.run, didn't handle messages and instead of it I used a special thread which checked globally defined variable ApplicationTerminated that could be set out of everywhere.
Now with UniGUI I need to stop Application.run from another thread. All the ways mentioned from this topic are not working:
Application.Terminate (no result);
UniApplication.Terminate (access violation);
MainModule.UniMainModule.Terminate (access violation)
Is there another way of proper closing the application?