There are two versions of Thread.join 1) Thread.join() 2) Thread.join(integer) this returns a bool value.
Example: If we have two threads-> Thread1 & thread2 while executing “Thread1” you call “Thread2.Join()”. So “Thread1” will wait until “Thread2” has completed its execution and again invoke “Thread1”.
Thread.join(integer) ensures that thread does not wait for a long time. once it exceeds the provided specific time, It will start the waiting thread.
There are two versions of Thread.join
1) Thread.join()
2) Thread.join(integer) this returns a bool value.
Example: If we have two threads-> Thread1 & thread2 while executing “Thread1” you call “Thread2.Join()”. So “Thread1” will wait until “Thread2” has completed its execution and again invoke “Thread1”.
Thread.join(integer) ensures that thread does not wait for a long time. once it exceeds the provided specific time, It will start the waiting thread.
need an explanation for this answer? contact us directly to get an explanation for this answer