Thread .Join and Thread .IsAlive functions in C sharp Arabic #90
Retrieving data from Thread Function using callback method in C sharp Arabic #89
❑ Significance of Thread .Join and Thread .IsAlive functions.
Join blocks the current thread and makes it wait until the thread on which join method is invoked completes . Join method also has a overload where we can specify the timeout. If we don’t specify the timeout the calling thread waits indefinitely , until the thread on which Join() is invoked completes. This overload Join (int millisecondsTimeout ) method returns Boolean .True if the thread has terminated otherwise false.
Join is Particularly useful when we need to wait and collect result from a thread execution or if we need to do same clean-up after the thread has completed.
IsAlive returns Boolean . Ture if the thread is still exciting otherwise false.
Follow Us
If you want to download pptx : click Telegram