The Thread represents a background thread.
To create and run a background thread, the following steps are necessary:
Creates a new instance of Thread.
Set the thread main function with ThreadMain.
Call the Start method to initialize and run the background thread.
Call the Stop method to tell the background thread to terminate gracefully.
Call the Join method to actually wait until the thread has terminated.
The Create method can be used as a shortcut for steps 1, 2, 3 and 5.
Calls Stop on each of the given threads and then disposes them.
Waits until this thread has terminated.
If the thread has already been terminated, the method returns silently.
Starts this thread.
If the thread has already been started, the method silently returns.
Stops the thread.
The thread will be signalled to stop. It will not have been terminated when this method returns. Use the Join method for waiting for the termination of the thread.
If the thread has already been stopped, the method returns silently.
The argument object to pass to the thread main method.
The argument object may only be set before Start is called.
- See also
The error info of the exception that has occurred in the
Run method of the threads main method (see IThreadMain).
Output a log message when the thread terminates due to an unhandled exception?
The thread name.
The thread name may only be set before Start is called.
Gets or sets the thread priority.
Defaults to ThreadPriority.Normal.
Gets or sets the thread main method.
The thread main method must be set before Start is called.