NewThreadOptions

Use these constants to specify the options parameter of the Execution.NewThread method.

  • NewThreadOption_AutoWaitAtEndOfSequence –(Value: 0x1) Use this option to have the calling sequence wait for the launching thread to complete before the calling sequence returns. You must specify a SequenceContext when you call the Execution.NewThread method to apply this option.
  • NewThreadOption_InitiallySuspended –(Value: 0x2) Use this option to specify that TestStand creates the new thread in a suspended state. Call the Thread.Resume method to start the thread, or use an ActiveX/COM step to call the Thread.Resume method from a sequence.
  • NewThreadOption_NoOptions –(Value: 0x0) No options.
  • NewThreadOption_UseSTA –(Value: 0x4) Use this option to specify whether the concurrency model of the thread is initialized as single-threaded apartment (STA) or multi-threaded apartment (MTA). By default, TestStand initializes new executions and threads to use the MTA model. A thread must use the STA model if the thread creates or launches a dialog box that contains ActiveX controls. If you use this option to launch a sequence with a step displaying an ActiveX control, you might need to set the Load Option on the Run Options tab of the Step Properties dialog box to Load dynamically . This ensures that TestStand loads the module the step calls in the thread initialized as STA.

See Also

Execution.NewThread

Run Options tab

Step Properties dialog box

Thread.Resume