NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

State of GUI application launched from sequence in a STA mode

I have a GUI object that needs to be running from a STA thread, so I created a "GUI" subsequence in my Application.seq. In my Application.seq's main sequence's local variable I created a GUIObj as a object reference variable.  When calling my GUI subsequence I call it in a new thread with STA settings and pass GUIObj as a parameter. The passed in parameter is used by GUI subsequence to launch my GUI. My question is when my GUI subsequence finishes my thread seems to end, but my GUI application is running, so in what thread is the GUI application running. My assumption was as long as the GUI applicaton is running the thread with STA settings will be alive.
 
Ifti
0 Kudos
Message 1 of 3
(3,055 Views)

Don't worry I will make sure the thread/ sequence doesn't finish unless the GUI is explicitly closed.

 

Ifti

0 Kudos
Message 2 of 3
(3,045 Views)

I'm not in a position to 100% verify this at the moment, but I'm pretty sure what is happening is that your thread is returned to an internal thread pool. For a variety of reasons, the thread must continue to pump messages while in the pool. This causes no overhead when there are no messages. However, it will allow your window to live on when you might have otherwise expected it to hang.

0 Kudos
Message 3 of 3
(3,036 Views)