Thread.CurrentThread Shared Method

Returns a thread object that corresponds to the currently running thread.

thread_object = Thread.CurrentThread()

Prerequisites

None

Parameters

None

Remarks

This shared method returns an object that corresponds to the currently running thread. This object may be used to abort or suspend the current thread. It does not need to be associated with a thread object, only the thread class.

Examples

Dim mythread As Thread = Thread.CurrentThread() ' Create a thread object
' for the current thread.
Thread.CurrentThread.Suspend () ' Suspend the current thread.

See Also

Thread Class