Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 07-24-2009, 07:10 AM   #1
Registered: Mar 2007
Distribution: GNU/Linux debian unstable main
Posts: 93

Rep: Reputation: 17
glib threads and mutexes

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.

Old 07-24-2009, 08:05 AM   #2
Registered: May 2002
Location: new hampshire
Distribution: Fedora, RHEL
Posts: 600

Rep: Reputation: 109Reputation: 109
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.

Last edited by orgcandman; 07-24-2009 at 09:24 AM. Reason: proper API


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Overuse of mutexes (pthreads) virtualCoder Programming 3 10-05-2007 07:57 AM
Java threads listed using kill -3 does not contain all threads found using ps -auxww coneheed Programming 2 11-14-2005 09:57 AM
problems in locking multiple mutexes stephenwalter Programming 4 11-14-2005 03:52 AM
Threads and Mutexes jonty_11 Programming 4 04-05-2005 04:51 PM
Debugging mutexes subu_s Programming 1 03-02-2005 12:52 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration