Deprecated g_main_context_wait

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

 



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

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux