Academic Company Events Community Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated

Windows System Handle Count Increases When Executing Sequence Call Steps in New Threads from a Loop

Primary Software: TestStand
Primary Software Version: 2.0
Primary Software Fixed Version: N/A
Secondary Software:

If you create a loop in your sequence which contains sequence calls that will execute the subsequences in new threads, the system handle count will steadily increase if a specific setting is selected in the sequence call step properties. On Windows NT/2000/XP you can view the system handle count during a sequence execution through Task Manager, under the Performance tab in the Totals section. If enough sequence call steps are launched in new threads with this behavior enabled, the system can potentially lock up and become unresponsive.

To remedy this very specific problem you can disable the TestStand sequence call step setting for "Automatically Wait for the Thread to Complete at the End of the Current Sequence", by doing the following:

  1. Right-click the sequence call step and select "Specify Module..."
  2. Under the "Multithreading and Remote Execution" section of the dialog where you have selected to "Run Sequence in New Thread" click the "Settings..." button
  3. Uncheck the "Automatically Wait for the Thread to Complete at the End of the Current Sequence" box, which is enabled by default

* Note: This setting causes the TestStand engine to store a thread handle for each sequence thread generated so that it can check its status at the end of the parent sequence's execution to keep the parent from ending while the child threads are still active. You can store your own reference to the thread and obtain the results, status, and error information from the asynchronous call using the TestStand API. To get information about the executing thread, you need to disable the "Automatically Wait for the Thread to Complete at the End of the Current Sequence" box so that TestStand will return control to the following steps. For more information about this, see the KnowledgeBase linked below.

Related Links:
KnowledgeBase 2Q3HDU6E: How Can I Get the Status of Another Sequence Execution?


Report Date: 02/21/2003
Last Updated: 09/29/2017
Document ID: 2UK7QTEV

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit