LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 01-19-2012, 01:19 AM   #1
pbardale7
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Rep: Reputation: Disabled
Multithreading-checking status of all child threads(returning values) in main thread


Hi All,

I have just started with the threading, i am having an client server application in this, i am creating three threads and having same thread function. i am passing values through all thread and returning values to main thread. in that if one thread returns me some value and and other are in execution.
i wanted to check the status of all thread at main thread function and kill all other threads which has not returned yet!!! can u please guide with some example so that i can understand the flow...

Thanks & regards in advance.

Pravin
 
Old 01-19-2012, 04:35 PM   #2
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
What programming language are you using, Java, C, something else?
 
Old 01-19-2012, 10:08 PM   #3
pbardale7
LQ Newbie
 
Registered: Jan 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kakaka View Post
What programming language are you using, Java, C, something else?
I am Using C++.
 
Old 01-19-2012, 11:22 PM   #4
rigor
Member
 
Registered: Sep 2003
Location: 19th moon ................. ................Planet Covid ................Another Galaxy;............. ................Not Yours
Posts: 705

Rep: Reputation: Disabled
Quote:
Originally Posted by pbardale7 View Post
I am Using C++.
OK, but since this a Non-*Nix ( not necessarily, Linux, or Unix, etc. ) forum, we need more specific information as to how you are trying to go about threading, and what concepts you might be using, that could affect what factors into the approach to threading.

Are you using STL, Boost, or what? What sort of threading are you using, Linux, Posix, something else??? Are you working on a Unix-like system, working on MS-Windows, Mac, or what? What library call, or comparable, are you using to create a thread?
 
  


Reply



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
Difference between Child THREAD and Child PROCESS whho Linux - Newbie 12 02-16-2015 12:22 AM
why new threads exie when main thread exit. Santoshkb Programming 1 05-22-2010 06:24 PM
the return value of getpid() called from main thread and new thread r identical !!! cryincold Programming 3 02-29-2008 01:37 AM
java multithreading wait for all threads to die true_atlantis Programming 1 10-01-2004 06:26 PM
Main thread sending notification to child thread rajesh_b Programming 1 09-22-2004 09:15 AM

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

All times are GMT -5. The time now is 09:41 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
Open Source Consulting | Domain Registration