.NET INTERVIEW QUESTIONS - What is Thread.Join() in threading ?
What is Thread.Join() in threading ?
There are two versions of Thread.Join :-
* Thread.join(Integer) this returns a Boolean value.
The Thread.Join method is useful for determining if a thread has completed before starting another task. The Join method waits a specified amount of time for a thread to end. If the thread ends before the time-out, Join returns true; otherwise it returns False. Once you call Join, the calling procedure stops and waits for the thread to signal that it is done.
Example you have "Thread1" and "Thread2" and while executing 'Thread1" you call "Thread2.Join()".
So "Thread1" will wait until "Thread2" has completed its execution and the again invoke "Thread1".
Thread.Join(Integer) ensures that threads do not wait for a long time. If it exceeds a specific time which is provided in integer the waiting thread will start.
2009-12-09, 4424👍, 0💬
What is AL.EXE and RESGEN.EXE? In the previous question you have seen how we can use resource files ...
What Is the Difference between Formal Parameters and Actual Parameters? - Oracle DBA FAQ - Creating ...
What Happens If a Hyper Link Points to a Music File? - XHTML 1.0 Tutorials - Understanding Hyper Lin...
How To Use mysqlbinlog to View Binary Logs? - MySQL FAQs - Server Daemon mysqld Administration If yo...
What is the purpose of Replication ? Replication is way of keeping data synchronized in multiple dat...