+ 1
What is join method used for?
Can anyone explain me the concept of join method in multi threading and how it exactly works
1 Respuesta
+ 1
join() will wait until the timeout expires or the thread finishes.
sleep() will just wait for the specified amount of time unless interrupted.
join() waits for something meaningful.
sleep() just sits there doing nothing