Fwd: Explain on Thread Join

Got a wonderful sentence:

In general, thread join is for a parent to join with one of its child threads.

Thread join has the following activities, assuming that a parent thread P wants to join with one of its child threads C.

Got a wonderful sentence:

In general, thread join is for a parent to join with one of its child threads.

Thread join has the following activities, assuming that a parent thread P wants to join with one of its child threads C.

  • When P executes a thread join in order to join with C, which is still running, P is suspended until C terminates. Once C terminates, P resumes.
  • When P executes a thread join and C has already terminated, P continues as if no such thread join has ever executed (i.e., join has no effect).

 

Leave a Reply

Your email address will not be published. Required fields are marked *