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. A more complete description of the common pitfalls
View Tutorial          By: Phil at 2012-11-25 02:06:49

2. how to code for images hitting in jsp like googl
View Tutorial          By: Kumaravel at 2014-08-06 11:23:08

3. nice tutorial with discussion
View Tutorial          By: Md Firoz at 2012-01-07 11:00:29

4. the difference is of great important for new comme
View Tutorial          By: ramesh shetty at 2013-03-12 15:27:23

5. Very good description. I was quite confused before
View Tutorial          By: Donna at 2011-07-31 03:46:05

6. Thanks for the code. The code runs fine without an
View Tutorial          By: aanube at 2012-08-22 10:12:54

7. i want full information of java topics
View Tutorial          By: mahesh at 2008-12-14 23:38:50

8. not bad
View Tutorial          By: JUST_PREET at 2013-03-06 11:37:15

9. I could not understand, anyone having an easier ex
View Tutorial          By: aatish at 2011-09-14 09:52:28

10. I need a sample example using checkbox in struts.t
View Tutorial          By: Nandhu at 2011-02-25 07:45:39