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



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. Good stuff.
View Tutorial          By: flazwbooks at 2010-07-18 05:50:50

2. can u give a gud example on command line arguments
View Tutorial          By: shravan at 2010-04-09 23:11:18

3. how to import myownclass into another class same p
View Tutorial          By: rana at 2013-04-19 17:32:08

4. hi I am getting error while running this program a
View Tutorial          By: sampada at 2012-04-18 07:45:19

5. MSComm1.Settings="9600,n,8,1"

View Tutorial          By: ali at 2012-02-25 21:52:21

6. very good explanation for Include Action in struts
View Tutorial          By: VIshwanath at 2011-03-21 06:00:22

7. I want to creat a bilingual dictionary for mobile
View Tutorial          By: Maryam at 2011-01-25 02:28:44

8. Its of the type "Direction"...Enum type
View Tutorial          By: Avinash at 2010-10-29 04:53:35

9. dummy piece
View Tutorial          By: Dummy at 2011-07-29 09:40:11

10. Thanks for a nice article !!!
View Tutorial          By: Piyush Sharma at 2011-12-15 12:24:06