LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   glib threads and mutexes (https://www.linuxquestions.org/questions/programming-9/glib-threads-and-mutexes-742437/)

joel2001k 07-24-2009 06:10 AM

glib threads and mutexes
 
Hi,
I'm writing a multithreaded application with GTK+ the application consists of five threads. Now I want to stop the execution of three threads that means the calling thread of the mutex and an other one should still run. Could someone explain me how to do this? I'm writing this application in C.

thanks

orgcandman 07-24-2009 07:05 AM

Do you want to terminate them or pause them and resume at another time?
If you just want to kill them, you can g_thread_exit(NULL); in each of the threads you want to terminate
If you want to pause them and resume later, you'll probably want to use g_cond_wait and g_cond_broadcast.


All times are GMT -5. The time now is 04:50 AM.