Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

A question about using Join in Thread.  RSS feed

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

I never used Java Threads explitly . So please let me know this one.

Consider a thread T1 invokes the method join() on a thread T2.

Is this mean that The Thread T1 will be coming under Runnable state only if when Thread2 has completed its operation (i mean its run method)
 
Campbell Ritchie
Sheriff
Posts: 53760
127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sounds like something which would sit better on the threads forum. Moving.
 
Vijitha Kumara
Bartender
Posts: 3973
24
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ravi Pavan wrote:Consider a thread T1 invokes the method join() on a thread T2.Is this mean that The Thread T1 will be coming under Runnable state only if when Thread2 has completed its operation (i mean its run method)


T1 will wait for T2 to die (that is T2 finishes it's execution).

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understood .Thank you .
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!