Hi,
recently i have been studying Threading, and quite fascinated by it. however i am struggling to understand in what circumstance a programmer will be using a join method on a thread.
what i understand from reading docs is, if i call join() on a thread "thread1", then whenever this call happens the "current thread" will stop its execution till "thread1" finishes its execution i.e. DIE.
when code is executing no one has control over which thread will be the current thread when the join is called.
can someone please explain with a real life scenario?
Thanks in advance