Question about gdk_threads_enter



Title: Question about gdk_threads_enter

Hello,

I use Glib threads in my application to update the data displayed in my GTK windows.
I use a conditionnal thread. I have a callback that tracks key press event.

Here is a piece of code of my thread :

while (status != 1){
         g_mutex_lock (mutex);
        .... retrieve the new values of my data ...

        gdk_threads_enter ();
        ... update my data on the window
        gdk_threads_leave ();

        status = g_cond_timedwait (mutex...);
         g_mutex_unlock (mutex);
}


During the execution of my thread, when I press a key just after the gdk_threads_enter instruction, I stay blocked just after the gdk_threads_enter ().

Why am I staying blocked ?? Do I make something wrong ??

Thanks for answers.

Isabelle








Isabelle



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