NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to transfer data between 2 threads ?

For exchange datas between 2 threads
0 Kudos
Message 1 of 2
(3,524 Views)
File Globals for a sequence file by default are shared between threads but not across executions. So if the sequences are in the same sequence file and the threads are in the same execution, you can just share using a file global variable. Note that a sequence file property exists to force the file globals to be shared across executions also.

Another way is to use the synchronization step type called a Queue. This is nice because the queue is referenced using just a name. Once data is added to the queue, you can remove the item from the queue if the data is message based, or you could just get the value from the queue and leave the data in the queue if the data is state based.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 2
(3,524 Views)