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 !...That explains my long-term question
View Tutorial          By: Vineeth at 2012-02-01 03:50:21

2. i want to SCJP exam ,tell how to apply for this ex
View Tutorial          By: PRABAKARAN at 2013-07-16 13:32:50

3. it is very very use full to us
View Tutorial          By: santhosh at 2008-12-07 14:46:13

4. Nice one. I havn't thought of this before.
View Tutorial          By: Aniket Sawant at 2013-04-09 05:40:58

5. /*Overridding & equals:--> Overriding is an
View Tutorial          By: Naveen Kumar at 2011-04-30 18:44:55

6. hiii frds i want to run this program can i run usi
View Tutorial          By: arun kumar ojha at 2011-07-20 00:59:10

7. 510
1020
2040
4080
816

View Tutorial          By: sky at 2010-07-17 06:54:46

8. I am using my NOKIA 2700 via blutooth connection.
View Tutorial          By: Rahi at 2010-05-11 04:39:33

9. Re: Inner Classes
Aside from allowing acces

View Tutorial          By: lee smith at 2010-01-17 10:59:23

10. pretty simply explained
View Tutorial          By: nivedita at 2011-06-09 07:32:58