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);
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
....
....
}
_______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx https://mail.gnome.org/mailman/listinfo/gtk-list