No, there isn't. Once the idle is set, it will be called the next time
the MainLoop regain control. But your are setting from another thread so
the mainloop is running. Maybe the solution would be to set the idle in the
main loop thread where you can have more control about that.

Best,
Scuri


Em qui, 4 de jul de 2019 às 15:18, Matthew Kennedy <burnsid...@gmail.com>
escreveu:

> 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
>
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users

Reply via email to