To sidj -
It is not clear as to whether the thread that you want to kill is a thread in a TestStand execution created using a Sequence Call step. I will assume yes.
In general killing threads within a process can make the process unstable because resources are not cleaned up properly, and events and message can be lost.
As long as a thread is "responsive", it is possible to have the thread periodically check for a condition to instruct it to exit.
Aaron suggested to launch the child thread as an execution because you can Terminate or Abort the child execution without affecting the parent execution.
For TestStand executions, a condition that can be checked is the execution's running state, i.e. Running, Terminating or Aborting. TestStand e
xecutions check for changes in this state automatically between the running of steps. In addition, many of the TestStand step types that block and wait also check for changes in the running state. If you own the code for a step's code module and it runs for a long period of time and the code module can monitor the execution's running state by passing it the Sequence Context, the step can be more responsive to a Terminate or Abort.
You can take a look at the code for the MessagePopup step type as a basic example.
Scott Richardson (NI)
Scott Richardson
https://testeract.com