Home arrow static arrow Java Programming [Archive] - Spinoff Discussion: Are Too Many New Threads Bad?
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - Spinoff Discussion: Are Too Many New Threads Bad?
This topic has 15 replies on 2 pages.    « Previous | 1 | 2 |

Posts:340
Registered: 7/8/04
Re: Spinoff Discussion: Are Too Many New Threads Bad?  
Aug 8, 2004 1:26 PM (reply 15 of 15)



 
No, I wouldn't write it like that. That's why I asked
what you wanted to do, so I could show you some code.

Sorry if I wasn't specific enough. The concurrent package looks interesting, but I think it's overkill for my current app. Here is the problem I'd like to solve as cleanly as possible (details of my specific app shouldn't be relevant):

You have two or more Runnable classes. We have a client class that will create threads on them, starting and stopping those threads multiple times. Following your advice, we don't want to kill the threads when we start and stop them. What is the best way to implement this?

My Test app above was my attempt at an implementation, but probably not a very good one.

thanks for any more advice,
John
 
This topic has 15 replies on 2 pages.    « Previous | 1 | 2 |