TestStand 2019 Help
»View Product Info
Most of the TestStand Synchronization step types create and control the following types of synchronization objects:
- Lock—Use a Lock object to guarantee exclusive access to a resource. For example, when several execution threads write to a device that does not have a thread-safe driver, use a Lock object to ensure that only one thread accesses the device at a time.
- Rendezvous—Use a Rendezvous object to make threads wait for each other before proceeding past a location you specify. For example, when different threads configure different aspects of a testing environment, use a Rendezvous object to ensure that none of the threads proceed beyond the configuration process until all threads complete the configuration tasks.
- Queue—Use a Queue object to pass data from the thread that produces the data to a thread that processes the data. For example, a thread that performs tests asynchronously with respect to the Main sequence might use a queue to receive commands from the Main sequence.
- Notification—Use a Notification object to notify threads when an event or condition occurs. For example, when you launch a dialog box in a separate thread, use a Notification object to notify another thread when the user dismisses the dialog box.
- Batch—Use a Batch object to define and synchronize a group of threads, which is useful when you want to test a group of similar units under test (UUTs) simultaneously. You can configure a synchronized section so that only one UUT enters the section at a time, no UUTs enter the section until all are ready, or no UUTs proceed beyond the section until all UUTs complete, which is useful when, for a particular test, you have only one test resource you must apply separately to each UUT. You can also configure a synchronized section so only one thread executes the steps in the section, which is useful for an action that applies to the entire batch, such as raising the temperature in an environmental chamber. When you control a separate thread for each UUT, you can exploit parallelism and enforce serialization when necessary. You can also use preconditions and other branching options to create a unique flow of execution for each UUT.
The Batch process model creates Batch objects. The model uses Batch Specification steps to group test socket execution threads together so you can use Batch Synchronization steps to synchronize the threads in a sequence file. When you want to create a synchronized section for a single step, use the Synchronization panel on the Properties tab of the Step Settings pane instead of using Batch Synchronization steps.
- Semaphore—Use a Semaphore object to limit access to a resource to a specific number of threads. A Semaphore object is similar to a Lock object except a Semaphore object restricts access to the number of threads you specify rather than to just one thread. For example, use a Semaphore object to restrict access to a communications channel to a limited number of threads so that each thread has sufficient bandwidth. Typically, you limit access to a shared resource to only one thread at a time. Therefore, typical applications use Lock objects instead of Semaphore objects.
Synchronization Object Support for 64-bit TestStand