callback and thread



I would like to know why I can't call a thread that modify a gtkwidget
in an callback function.

It hangs up as gdk_threads_enter is used.

Here the problem :

// main function :

gdk_threads_enter()
gtk_main()
gdk_threads_leave()


// callback :

phread_create(... thread_function ...)


// thread_function :

gdk_threads_enter()
// modify a widget
gdk_threads_leave()

When the program runs :

The call of gdk_thread_enter in the thread function hangs.

I think that the problem comes from the fact that 2 calls of
gdk_threads_enter
are likely to be nested ... but it is in a different thread. I would
like to
understand what is the exact problem and if a solution exists.


-- 
Hoa




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