6 years, 10 months ago.

What is the use of thread.join() ?

I want to know about thread.join() and when shall we use it?

1 Answer

6 years, 10 months ago.

You can wait in a thread to finish another thread.

"This synchronizes the moment this function returns with the completion of all the operations in the thread: This blocks the execution of the thread that calls this function until the function called on construction returns (if it hasn't yet)."

http://www.cplusplus.com/reference/thread/thread/join/

Accepted Answer

Thanks Mark, got it

posted by Amod Amatya 12 Jun 2017