NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to create an execution which will end as ExecutionTerminationStates.ExecTermState_KillingThreads

Hi

Can any explain how to create an execution which will end with termination stateExecutionTerminationStates.ExecTermState_KillingThreads?

 

Regards,

Ceaser

0 Kudos
Message 1 of 2
(2,909 Views)

Ceaser,

 

Killing threads is a drastic action that a user can choose to take if an execution is not responding.  Executions should should never enter this state under normal testing conditions! 

 

Since you don't provide any background as to why you want to know this information, I want to be very clear that you should not be using this state to implement any normal code-flow.  The state should only ever exist in an error condition.

 

Now with that said, if you want to do testing of some error handling code, here's how you can get into that state if you want to do testing:

  1. Start an execution with a long-running code module.  A code module with an infinite while loop is ideal.
  2. While the code module is running, terminate the execution (you can also try to close your UI).  If the execution is unable to terminate, after a fixed time (defined in Configure»Station Options»Time Limits) a dialog will appear allowing you to choose what to do.
  3. Your choices will be to: continue waiting, abort execution, or kill execution threads.  If you choose kill threads, the execution will end with the termination state you ask about.

Please note the warning under Kill threads: "WARNING: killing threads can leave TestStand in an unreliable state".  For this reason, you only want to kill threads if you are willing to take the chance that your system will be in an unknown state and you will need to restart TestStand.

Josh W.
Certified TestStand Architect
Formerly blue
0 Kudos
Message 2 of 2
(2,872 Views)