Acquire (decrement) Operation - Semaphore Settings Edit Tab
- Updated2025-07-21
- 1 minute(s) read
Acquire (decrement) Operation - Semaphore Settings Edit Tab
Acquire (decrement) Operation
Before you access a resource a semaphore protects, you must perform an Acquire (decrement) operation on the semaphore. Enable the Acquire option on the left of the Semaphore Settings panel.
The Acquire (decrement) operation contains the following options:
- Semaphore Name or Reference Expression —The semaphore on which to perform the operation. You can specify the semaphore by name or by the object reference you receive when you create the semaphore using the Use Object Reference for the Semaphore Reference Lifetime option.
- Auto Release —When you enable this option, TestStand releases (increment) the semaphore automatically when the lifetime you specify expires.
-
Acquire Lifetime
—Specifies how long the thread holds the semaphore after it acquires the semaphore. The thread releases the semaphore automatically when the
lifetime
of the acquire ends.
- Same as Sequence —Releases the object reference after the sequence executes.
- Same as Thread —Releases the object reference after the thread completes.
- Use Object Reference —Use this option when you want to explicitly control the lifetime of the object reference or when you wish to refer to the object using an object reference variable.
- Timeout Enabled, Timeout Expression, Timeout Causes Run-Time Error —Use these controls to specify the timeout behavior when waiting to acquire the semaphore. If a timeout occurs, the Step.Result.TimeoutOccurred property is set to True .