Hi John, I have read http://www.scriptbasic.org/forum/index.php/topic,335.0.html with interest.
What you are doing there is bits of GUI in a separate thread, which may have use, but not what I need at all. (I might also query whether it is possible to click buttons fast enough to trigger/test for any race conditions) What I am looking for is an invisible background worker thread waking up the GUI thread somehow. Yes, you could have a polling solution, but that is pretty bad news for any battery-powered device as it will never enter sleep mode. My question is really this: what problems, if any, might exposing the private function iupdrvSetIdleFunction() cause? It seems to me the answer is "none" on Windows, since all it does is set a single static pointer; I am asking for opinions on Linux (etc). Is is possible/necessary to add a bit of locking to make doubly-sure it is properly thread safe? Pete -------------------------------------------- On Thu, 24/11/16, John Spikowski <supp...@scriptbasic.org> wrote: Subject: Re: [Iup-users] IupSetIdleFunction To: "IUP discussion list." <iup-users@lists.sourceforge.net> Date: Thursday, 24 November, 2016, 4:46 Hi Pete, We have had success with Script BASIC and IUP running in the threaded mode without doing anything special except keeping the message loop in the main process. John On Wed, 2016-11-23 at 22:35 +0000, Pete Lomax wrote: > > Just to be clear, the point of that long rambling post was "how to > communicate with the main GUI thread" > > ------------------------------------------------------------------- > ----------- > _______________________________________________ > Iup-users mailing list > Iup-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/iup-users ------------------------------------------------------------------------------ _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users ------------------------------------------------------------------------------ _______________________________________________ Iup-users mailing list Iup-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/iup-users