Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

ExternallySuspended Property

NI TestStand™ 4.1 Help
May 2008

NI Part Number:
370052G-01

»View Product Info

Syntax

Thread.ExternallySuspended

Data Type

Boolean

Purpose

Specifies whether this thread is suspended.

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 its 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.


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit