Comment on Tutorial - ThreadGroup Sample in Java By Mashoud



Comment Added by : pavan kurariya

Comment Added at : 2010-01-14 00:35:55

Comment on Tutorial : ThreadGroup Sample in Java By Mashoud
WHY You are using such huge code for suspending and resuming
.....appart from that we can just use
booean threadActivatedFlag = false;
while(){
initialize all thread..........
start the thread..
add in group...
}
........................
while(threadActivatedFlag )
{
if(threadGroup.activeCount()==0)
threadActivatedFlag = false;
else
Thread.sleep(4000);
}


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. Excellent example
View Tutorial          By: Dinesh Patil at 2012-06-19 08:30:48

2. hello,
i have completed my bsc(computer sci

View Tutorial          By: Geeta at 2012-07-25 13:35:07

3. I want to know that what is the main use of the &q
View Tutorial          By: Krunal Patel at 2012-09-17 08:11:19

4. I need a sample jsp(using Struts html tags) in thr
View Tutorial          By: Anil Kumar at 2008-10-23 04:14:51

5. Thanks for your tutorial.
View Tutorial          By: pre pais at 2015-01-09 00:14:29

6. Typecasting concept helped me alot in solving my p
View Tutorial          By: Arun at 2010-09-02 00:23:38

7. Thks a lot..... The way of giving explanation and
View Tutorial          By: Hari at 2011-04-08 02:58:06

8. Well, I am fortunate to run CentOS 5 - everywhere
View Tutorial          By: Goozy at 2009-07-25 11:18:45

9. good explanation .... Thanks
View Tutorial          By: nazeer at 2012-05-24 09:18:19

10. i need a J2me PIM for accessing phone contact... <
View Tutorial          By: shafique at 2011-06-28 04:11:55