NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

about threads

Hi room,
 
Is it true that an execution starts with a sequential model will only create one thread, which means that it can only execute step by step?
 
And,
 
what's the difference if I create two executions for a sequence file and create two threads in one execution?
0 Kudos
Message 1 of 4
(3,302 Views)

Hi RAVDM,

you are right: An execution usually starts with one thread. You can also verify this (using the TS API): Ask for the number of threads you currently have in an execution.

An execution contains much more than only a thread: The report generation is a feature that is connected to an execution (not to a thread). Running one sequence in two executions might result/typically results in two reports  whereas  creating two threads in one execution allows you e.g. to do things in parallel (and usually results in one report).

There is much more to say about differences between threads and executions but I will not do any copy and paste from the TestStand documentation. If my answer above does not cover your question: feel invited to post the next question.

Hope this helped, Guenter

0 Kudos
Message 2 of 4
(3,296 Views)
Thank you for your kindly reply.
 
When it says "execution contains information need for running sequence file, sequence...." ,does it mean that it make run-time copy of information it need, and then when start a sequence execution, the sequence context is the copy from this pool?
or
it keep references to the resources, and sequence context get filled through this reference?
0 Kudos
Message 3 of 4
(3,291 Views)

You are right with your expectation about the run-time-copy: Before an execution starts, a in-memory-copy (or copies) are created. This e.g. allows you to modify step properties at run-time without affecting a sequence file on hard disk.

As soon as a sequence executes the sequence context contains the current(!) execution information. This you can verify e.g. in SeqEdit by setting a breakpoint and watching the RunState property: It updates with each step that you execute (which you can try out by e.g. stepping over a step).

Regards, Guenter

0 Kudos
Message 4 of 4
(3,283 Views)