RfsgDriverUtility.Lock(PrecisionTimeSpan) Method
- Updated2025-05-22
- 1 minute(s) read
Rfsg
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.Fx45 (in NationalInstruments.ModularInstruments.NIRfsg.Fx45.dll) Version: 2025
Syntax
public RfsgDriverLock Lock( PrecisionTimeSpan maxTime )
Public Function Lock ( maxTime As PrecisionTimeSpan ) As RfsgDriverLock
Parameters
- maxTime PrecisionTimeSpan
- Specifies the maximum amount of time to wait to acquire the lock.
Return Value
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.