DigitalDriverUtility.Lock Method (PrecisionTimeSpan)
- Updated2023-11-24
- 1 minute(s) read
DigitalDriverUtilityLock Method (PrecisionTimeSpan)
Acquires a synchronization lock on this instance of the driver.
Namespace: NationalInstruments.ModularInstruments.NIDigital
Assembly: NationalInstruments.ModularInstruments.NIDigital.Fx40 (in NationalInstruments.ModularInstruments.NIDigital.Fx40.dll) Version: 2021
Syntax
public IIviDriverLock Lock( PrecisionTimeSpan maxTime )
Public Function Lock ( maxTime As PrecisionTimeSpan ) As IIviDriverLock
Parameters
- maxTime
- Type: Ivi.DriverPrecisionTimeSpan
The maximum amount of time to wait to acquire the lock.
Return Value
Type: IIviDriverLockA reference to the acquired lock.
Implements
IIviDriverUtilityLock(PrecisionTimeSpan)Remarks
The calling thread is blocked
until either the lock is acquired or maxTime expires. If the lock is not acquired within the interval specified
by maxTime, an exception is returned. This method is useful for gaining exclusive access to the driver instance
across a series of methods calls. You must call Unlock on the returned lock to relinquish the
lock and allow other threads to access this instance of the driver.