Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
.NET INTERVIEW QUESTIONS - What is Thread.Join() in threading ?
What is Thread.Join() in threading ?
✍: Guest
There are two versions of Thread.Join :-
* 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, 4598👍, 0💬
Popular Posts:
Assuming that the structure of a table shows two columns like this: --------+------------+-- ----+---...
What's the output of the following program? And why? #include main() { typedef union { int a; char b...
How do you override a defined macro? You can use the #undef preprocessor directive to undefine (over...
How to force a page to go to another page using JavaScript? <script language="JavaScript" typ...
How To Merge Cells in a Row? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells If you wan...