Export (0) Print
Expand All

Thread.Join Method

Blocks the calling thread until a thread terminates, while continuing to perform standard COM and SendMessage pumping.

Namespace:  System.Threading
Assembly:  mscorlib (in mscorlib.dll)

[SecuritySafeCriticalAttribute]
public void Join()

ExceptionCondition
ThreadStateException

The caller attempted to join a thread that is in the ThreadState.Unstarted state.

Use this method to ensure that a thread has terminated. The caller will block indefinitely if the thread does not terminate. If the thread has already terminated when Join is called, the method returns immediately.

This method changes the state of the calling thread to include ThreadState.WaitSleepJoin. You cannot invoke Join on a thread that is in the ThreadState.Unstarted state.

Version Notes

Silverlight for Windows Phone Silverlight for Windows Phone

When a user navigates away from a Windows Phone application, the application is typically put into a dormant state. When the user returns to a dormant application, the application automatically resumes. If the application is put into a dormant state while this API is being used, the API will not complete as expected. Applications should be designed to handle this possibility. For more information about the Windows Phone execution model, see Execution Model for Windows Phone.

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Xbox 360, Windows Phone OS 7.0

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2014 Microsoft