Matt said “I gather it's not safe to call IUP functions from a NON IUP main-loop thread”. Is that right? Where did you hear this? I’m trying to call IUP functions from a Lua script running within the main-loop thread, and in various circumstances it is causing my application to close because IUP shuts down the entire thread when it exits - see my post “IUP crash in Debug Mode” (doesn’t just affect Debug Mode incidentally). Is this the issue you are referring to? If so, is there any other solution to it that you know of? Because I can’t run IUP on a second thread. I have to run it on the main-loop thread.
Simon From: Matthew Kennedy [mailto:burnsid...@gmail.com] Sent: 04 July 2019 7:18 PM To: iup-users@lists.sourceforge.net Subject: [Iup-users] using IDLE_ACTION with threads Hi, I've trawled through the mailing list archives trying to research this. I hope I haven't missed a solution to this already: I have IUP's main-loop running on thread, and I have another thread that needs to update something in the GUI. I gather it's not safe to call IUP functions from a NON IUP main-loop thread, so I've settled on acquiring a lock on and setting the IUP idle function to a function that includes the work needed to be performed by the non IUP main-loop thread (returning IUP_IGNORE, so as to run once). This works pretty well, but I believe if the NON IUP main-loop thread sets IUP idle function faster than the idle function is called by IUP, then my IUP idle functions will not always be called. Is there a way to set the idle function and wait for it to be called? Or even some way to set the idle function and trigger it to run immediately? Matt
_______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users