ExternallySuspended Property

TestStand 2019 Help

Edition Date: May 2019

Part Number: 370052AA-01

»View Product Info
Download Help (Windows Only)

Syntax

Thread.ExternallySuspended

Data Type

Boolean

Purpose

Note  Because the Allow Break While in Code Modules option on the Execution tab of the Station Options dialog box is enabled by default in TestStand 2014 or later, you do not need to use this property unless you disable the option.

Specifies to treat this thread as suspended when you stop the execution for a breakpoint.

Remarks

By default, when a step blocks or takes a long time to complete and the user attempts to suspend (break) execution, execution cannot suspend until the step unblocks and returns. For example, if the user breaks execution when a step launches a dialog box, execution does not suspend until after the user closes the dialog box.

A step uses this property to enable execution to break while it performs a lengthy operation or waits an indeterminate period of time. When a step sets this property, it specifies that TestStand considers the thread to be suspended if the user requests that the execution break. For example, you can add the following code to the step code module:

Boolean previousExternallySuspended = mySequenceContext.GetThread().ExternallySuspended

' set externally suspended to true
mySequenceContext.GetThread().ExternallySuspended = true

' Insert code to launch a dialog box or perform another operation that might block indefinitely

' restore the previous setting of externally suspended
mySequenceContext.GetThread().ExternallySuspended = previousExternallySuspended

Note  When you reset this property to False, the call to set the property blocks if the execution is suspended. This prevents the step from executing further until the user continues the execution.

WAS THIS ARTICLE HELPFUL?

Not Helpful