Re: Threading question (avoiding deadlock)

2002-03-18 Thread G Hasse
On Sun, 17 Mar 2002, Pascal Haakmat wrote: > Hello, > > I was hoping somebody could point me in the right direction here. > > I have a program with two (p)threads; one thread running the gtk_main() > event loop, and the other thread periodically updating the display in a > gdk_threads_enter() / g

Re: Threading question (avoiding deadlock)

2002-03-17 Thread Paul Davis
>I was hoping somebody could point me in the right direction here. your periodic update thread should check a variable that tells it to die. add a lock and a condition variable, and use it like this: void kill_periodic_thread () { pthread_mutex_lock(&lock_protecting_kill_flag); k

Threading question (avoiding deadlock)

2002-03-16 Thread Pascal Haakmat
Hello, I was hoping somebody could point me in the right direction here. I have a program with two (p)threads; one thread running the gtk_main() event loop, and the other thread periodically updating the display in a gdk_threads_enter() / gdk_threads_leave() block. When the user presses a key i