Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > JAVA Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 06-11-06, 04:09 PM   #1 (permalink)
Junior Member
 
anitha.s's Avatar
 
Join Date: Feb 2006
Location:
Posts: 58
Thanks: 0
Thanked 4 Times in 4 Posts
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 3 anitha.s has disabled reputation
thread - join()

What is the use join() method in Thread class?
anitha.s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 23-01-07, 03:30 PM   #2 (permalink)
Member
 
Join Date: Sep 2006
Posts: 40
Thanks: 0
Thanked 4 Times in 3 Posts
Thanks: 0
Thanked 4 Times in 3 Posts
Rep Power: 5 muralipn has a spectacular aura about muralipn has a spectacular aura about muralipn has a spectacular aura about
Re: thread - join()

Hi

When the join() method is called, the current thread will simply wait until
the thread it is joining with is no longer alive. This can be caused by
the thread not having been started, or having been stopped by yet another
thread, or by the completion of the thread itself. The join() method
basically accomplishes the same task as the combination of the sleep() and
isAlive() methods. However, by using the join() method, we accomplish
the same task with a single method call. We also have better control over the timeout interval, and we don't have to waste CPU cycles by polling.

There are three versions of the join method:

void join()
Waits for the completion of the specified thread. By definition,
join() returns as soon as the thread is considered "not alive". This
includes the case in which the join() method is called on a thread
that has not been started.

void join(long timeout)
Waits for the completion of the specified thread, but no longer
than the timeout specified in milliseconds. This timeout value is
subject to rounding based on the capabilities of the underlying
platform.

void join(long timeout, int nanoseconds)
Waits for the completion of the specified thread, but no longer
than a timeout specified in milliseconds and nanoseconds. This
timeout value is subject to rounding based on the capabilities
of the underlying platform.

Regards,
Murali
muralipn is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to muralipn For This Useful Post:
Old 29-01-07, 11:42 AM   #3 (permalink)
Junior Member
 
anitha.s's Avatar
 
Join Date: Feb 2006
Location:
Posts: 58
Thanks: 0
Thanked 4 Times in 4 Posts
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 3 anitha.s has disabled reputation
Re: thread - join()

Thanks
anitha.s is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thread class Vs Runnable interface Sudhan JAVA Technologies 5 24-09-08 08:10 PM
OOPS No Thread for AS 400 shahaan OTHERS 0 15-10-06 03:13 AM
is it the right time to join mainframes arjun.net Ask for Suggestion 2 20-03-06 06:40 AM
want 2 join mainframes,where arjun.net Ask for Suggestion 2 26-02-06 08:50 AM
theta join sandipancse ORACLE , SQL SERVER , SYBASE & Others 3 09-02-06 07:37 AM


All times are GMT +6.5. The time now is 04:18 AM.





Search Engine Optimization by vBSEO 3.1.0