Hi Andy, IUP isn't thread safe by default but that doesn't mean it can't be done. Here is an example in Script BASIC (Windows & Linux)
http://www.scriptbasic.org/forum/index.php/topic,335.0.html John On Fri, 2015-10-02 at 14:36 +1000, Andy Xiyue wrote: > Hi Scuri, > > > Recently I tried to use IUP with more than one thread. My plan is > simple, run IupMainLoop() in one thread and feed progress bar or text > control in another thread. Theoretically I don't need to synchronize > the IUP calls because the IupMainLoop() will process the events sooner > or later. However I met a lot of problems. Sometimes the client area > became invalided without refresh. Sometimes I got a core dump > triggered by X11 event. For example, the attached file was simplified > from my program. When the progress bar running, if you select text in > the text control, the app will received sig 11: > > iqiup: Fatal IO error 11 (Resource temporarily unavailable) on X > server :0.0. > > > It looks like I misunderstood the programming model of IUP. Is IUP > safe to update the attribution of controls in different thread? If > it's not, how can I manually send events to the main loop to update > the controls? > > > Kind regards > > Andy > > ------------------------------------------------------------------------------ > _______________________________________________ > 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