RfsgDriverUtility.Lock Method (PrecisionTimeSpan)
- Updated2024-05-08
- 1 minute(s) read
RfsgDriverUtilityLock Method (PrecisionTimeSpan)
Obtains a multithread lock on the instrument session and specifies the maximum amount of time to wait to acquire the lock.
Namespace: NationalInstruments.ModularInstruments.NIRfsg
Assembly: NationalInstruments.ModularInstruments.NIRfsg.Fx40 (in NationalInstruments.ModularInstruments.NIRfsg.Fx40.dll) Version: 2022
Syntax
public RfsgDriverLock Lock( PrecisionTimeSpan maxTime )
Public Function Lock ( maxTime As PrecisionTimeSpan ) As RfsgDriverLock
Parameters
- maxTime
- Type: Ivi.DriverPrecisionTimeSpan
Specifies the maximum amount of time to wait to acquire the lock.
Return Value
Type: RfsgDriverLockAn RfsgDriverLock object, that has the Unlock method.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | The Lock method was accessed after the associated NIRfsg object was disposed. |
Remarks
This method waits until all other execution threads have released their locks on the instrument session before it obtains a multithread lock on the instrument session.