Web lists-archives.com

Deprecated g_main_context_wait




Hi All,

my main task is to acquire context that is iterated in another thread. Code:

gpointer thread_routine(gpointer op)
{
    g_main_loop_run((GMainLoop*)op); // I can't change it
    return NULL;
}

int main()
{
    GMainLoop *mloop = g_main_loop_new(NULL, FALSE);
    GThread *thread = g_thread_new("loop", thread_routine, mloop);

    GMainContext *ctx = g_main_loop_get_context(mloop);
     // I want to acquire context here

    ....
}

currently I'm trying to use g_main_context_wait, but glib says that it will be removed. So what I should use instead and how?

Many thanks for help.

Regards,
R. Savchenko


_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-list