LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
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.

Notices


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

Rep: Reputation: 17
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
 
Old 07-24-2009, 07:05 AM   #2
orgcandman
Member
 
Registered: May 2002
Location: dracut MA
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 08:24 AM. Reason: proper API
 
  


Reply


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 06:57 AM
Java threads listed using kill -3 does not contain all threads found using ps -auxww coneheed Programming 2 11-14-2005 08:57 AM
problems in locking multiple mutexes stephenwalter Programming 4 11-14-2005 02:52 AM
Threads and Mutexes jonty_11 Programming 4 04-05-2005 03:51 PM
Debugging mutexes subu_s Programming 1 03-01-2005 11:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:46 AM.

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