Here th[i].join() will make main thread to wait until it is finished. So,
main--->
th[0].join()--->
main-->
th[1].join()--->
main-->
th[2].join()--->
main---->
Thus join() method makes to Join the current thread after
it goes to dead state.
No comments:
Post a Comment