Re: Threads and idle functions



Hi David,
probably you should use macros:
gdk_threads_enter ()
gdk_threads_leave ().

Best regards,
Igor


2012/7/3, David Buchan <pdbuchan yahoo com>:
My understanding is that child threads must never alter the UI in any way.

If I have a program which spawns a child thread to download some data and I
want to be able to have a dialog pop up should an error occur, is it correct
to say that I need an idle function to be running concurrently to monitor
some global variable which would contain the status (set by the download
thread), and then the idle function would create the dialog pop-up?

Put another way, if only the GTK+ main iteration is allowed to alter the
GUI, then how does someone get information out of a child thread and to the
UI?

Dave
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]