NI-Digital Pattern Driver .NET Class Library

Table of Contents

DigitalDriverUtility.Lock Method (PrecisionTimeSpan)

  • Updated2023-11-24
  • 1 minute(s) read
DigitalDriverUtility.Lock Method (PrecisionTimeSpan)

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: IIviDriverLock
A 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.

See Also

Log in to get a better experience