Suspends the execution of an independent thread.
thread_object.Suspend()
Prerequisites
None
Parameters
None
Remarks
This method suspends the thread associated with thread_object, just as if a console Break command were issued. The thread stops at the end of the current GPL instruction. The thread may be resumed where it left off by the Resume method or by a console Continue command. If the thread does not exist, an error occurs. If the thread exists but is not currently active, no error is generated. This method does not wait until the thread actually stops. Use the ThreadState property to determine when the thread is suspended.
Examples
Dim thread1 As New Thread(“Test”) ' Create a thread object to execute the
' procedure Test in the current project
thread1.Start() ' Start the thread
thread1.Suspend() ' Suspend the thread for now.
Thread.Sleep(1000) ' Wait for 1 second
thread1.Resume() ' Resume the thread
See Also