katang Posted March 31, 2020 Report Share Posted March 31, 2020 I have an educational-purpose GUI that displays the results of the simulation. The simulation is started in the run() method of a Qt5 thread. 1./ At some checkpoints the simulation suspends itself (receives an event, but does not execute it until the GUI sends a resume message), and the GUI can display whatever it wants. I wonder if I need to make any special trick because the GUI and the simulation are in different threads? (As I understood, the engine is just waiting, hopefully nothing happens that would interfere with the threading. I would prefer reading some values directly, just to display them, and avoid sending messages, if not absolutely needed.) 2./ As it is a kind of debugger, it may happen that the user terminates the simulation in a way that the simulation is still waiting for a resume message, but instead a new 'start' message arrives. What is the preferred way of quietly killing the engine? Is it OK, if I terminate and re-start the Qt thread? Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.