Waits at most millis milliseconds for this thread to die. A timeout of 0 means to wait forever
What does this exactly mean ? After the time elapses, does the join method kill the thread on which it has joined? or it exits the main thread ? I am quite confused because I have written a small code in which after the timeout happens, the thread on which join is called is still running. Can someone kindly provide some explanation on this Thanks in advance Sri
Originally posted by Sri Sri: [...] After the time elapses, does the join method kill the thread on which it has joined? or it exits the main thread ?
Neither. After the time elapses, the thread of control returns from the join() method without any action taken. You can call isAlive() on the thread to find out if join() has returned because the thread stopped, or whether it returned because the timeout had expired. - Peter