By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,738 Members | 2,016 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,738 IT Pros & Developers. It's quick & easy.

Multiple thread handle problem

P: n/a
hi

I am starting a no.of threads(500) from my application. i want to
start a new thread as soon as one of these threads dies.Any of the
thread could die at any particular time.Currently i am using a loop
to check which of the threads is alive and i can use join() for
others.I don't want to use a loop as that is eating a lot of memory.

Using synchronization method is it possible to block (creation of new
thread) untill one of the current thread dies.

Please help...

Anks
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
an***@4cplus.com (anks) wrote in message news:<ab**************************@posting.google. com>...
hi

I am starting a no.of threads(500) from my application. i want to
start a new thread as soon as one of these threads dies.Any of the
thread could die at any particular time.Currently i am using a loop
to check which of the threads is alive and i can use join() for
others.I don't want to use a loop as that is eating a lot of memory.

Using synchronization method is it possible to block (creation of new
thread) untill one of the current thread dies.

Please help...

Anks


Don't create thread directly. Make a thread pool as a singleton and
let user who need new thread retrieve his thread from the pool.
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.