NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Multi-Threading Best Practice

Solved!
Go to solution

I have very little experience with multi-threading. I completely understand the concept, but I have never had a situation until now where I could use it. I have a subsequence that I'd like to run in its own thread just to save some time (even though I don't think it'll take more than a millisecond to run). In the subsequence's Execution Options, I have it set to Use New Thread. Is that the proper way to do it? Do I need to do "garbage collection" with the threads and close them manually? What are some best practices for multi-threading in TestStand?

 

Thanks,

 

Jeremy

If it don't NI Test, it won't NI Stand™
0 Kudos
Message 1 of 3
(172 Views)
Solution
Accepted by topic author Jeremy.JPG

Multi-threading has overheads. If your task is not significant enough, your execution will be slower when multi-threading.

 

Yes, set the run in a new thread in the sequence call step. AFAIK, you don't need to do garbage collection as long as other tasks are not dependent on the one running in a new thread.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 2 of 3
(162 Views)

Thank you. You saved me a lot of time searching and scouring forums. I feel like it can be tough finding some TestStand information out there. Especially when it comes to syntax.

If it don't NI Test, it won't NI Stand™
0 Kudos
Message 3 of 3
(156 Views)