07-26-2022 09:30 PM
I can't seem to find any examples on how to use the Thread Wait Step options: Specify by Sequence Call and Specify Object Reference to the Thread (see below). Can anyone point to examples on how to use both options? When do you use one option over the other? Thanks.
Use the Thread operation to wait for a TestStand thread to finish executing.
The Thread operation contains the following options:
08-24-2022 01:55 PM
Hi testdesign,
I'm not aware of any examples that really demonstrate this behavior but it basically comes down to scope. You use Specify by Sequence Call if you want to wait for a subsequence that is in the same sequence as the wait step. Say you want to wait in your MainSequence on a thread that is a subsequence of a subsequence called from MainSequence. We'll call the subsequence called by the MainSequence seq1 and the subsequence called by seq1 seq2. In this case, you wouldn't be able to use Specify by Sequence Call because it will only let you point to subsequences that are in the same sequence as the wait step. In this case, the wait step is in MainSequence and seq2 is in seq1 so no dice.
When you create a subsequence and set it to execute in a new thread, you can store back an object reference to that thread in the "Sequence Call Advanced Settings" on the right side of the Module settings:
Once you have that stored into a variable, you can use Specify by Object Reference to the Thread to point the wait step at that variable to wait on threads that aren't in the same sequence as the wait step, essentially providing a broader scope.