Thread.WaitForEnd
- Updated2025-07-21
- 1 minute(s) read
Thread.WaitForEnd
Syntax
Thread.WaitForEnd( millisecondTimeOut, processWindowsMsgs = True, [stepToStoreResultsIn], [callingSequenceContext])
Return Value
Returns True if the thread finished executing. Returns False if the timeout expired.
Purpose
Waits for the thread to finish executing.
Parameters
millisecondTimeOut As Long
[In] Specifies the number of milliseconds to wait or, pass -1 to wait indefinitely.
If you pass a value for the callingSequenceContext parameter, TestStand suspends the timeout while the calling execution is suspended at a breakpoint so that the time spent at a breakpoint does not count towards the elapsed timeout time.
processWindowsMsgs As Boolean
[In] Pass True to process Microsoft Windows messages while waiting.
This parameter has a default value of True .
stepToStoreResultsIn As Variant
[In] [ Optional ] Specifies the step for which the result is set to the sequence result of this thread.
callingSequenceContext As Variant
[In] [ Optional ] If you call this method from within a sequence, you can pass the current sequence context to specify that the method returns immediately if the user terminates the execution from which you call this method.