std::thread::join [Advanced]

Here we have idea to discuss various cases where and how we should use join, in other words dos and don’ts with join(). We hope that it would be great learning for all of us.

Here we have listed down few questions, if you have some more please put them in comment section.

 

Question:-1: Why do we need to call join() on threadobject, although created thread has already finished its task.

Question:-2: Why does program lead to abort if join()is not called?

Question:-3: What will happen if we call join again on same thread?

Question:-4: Can we reuse that same thread-object for different tasks after join()?


PREV:: std::thread::join

Your Comments /Suggestions & Questions are always welcome. 

We would like to help you with best of our knowledge.

So feel free to put Questions.

No comments:

Post a Comment