On Wed, 05 Oct 2011 14:00:40 +0100 Andrew Wood <a....@me.com> wrote: > Is there a way to ensure a timeout callback set with g_timeout_add is > always executed by a specific pthread?
Timeouts started with g_timeout_add() or g_timeout_add_full() execute in the default main context, which is normally the main context of the thread with which the program begins and which first creates a main loop (as by, for example, calling gtk_main()/g_main_loop_run()). If you have more than a worker thread with its own main loop and you want the timeout to execute in the worker thread's main loop, you have to create a timeout source with g_timeout_source_new() and attach it to the worker thread's main context with g_source_attach(). Chris _______________________________________________ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list