Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

join method of thread class  RSS feed

 
Muneer Ahmad
Greenhorn
Posts: 7
Fedora Java Oracle
  • Mark post as helpful
  • send pies
  • Report post to moderator
Can anybody please explain me how to use join() method to wait a thread for finishing of other thread(but not for main thread.). Suppose i have three threads t1, t2, t3 and i want that t1 should wait for t2 to finish and t2 should wait for t3 to finish.
 
Paul Clapham
Sheriff
Posts: 22482
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Report post to moderator
Then t1 should call "t2.join()" and t2 should call "t3.join()".
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!