VTimeZoneCollectionAcquireReaderLock Method

This can be used to acquire a reader lock on the collection to perform bulk read operations

Definition

Namespace: EWSoftware.PDI.Objects
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2023.1.2.0
public void AcquireReaderLock(
	int timeout,
	bool upgradeable = false
)

Parameters

timeout  Int32
The timeout in milliseconds after which the lock attempt will fail
upgradeable  Boolean  (Optional)
True if the reader lock should be upgradeable to a writer lock, false if not. Typically, this should be false unless you may need to acquire a writer lock during the period which the read lock is held.

Remarks

Calls to this method should be paired with a call to ReleaseReaderLock to release the lock when done.

This is useful for access to the TimeZones collection in web applications when enumerating the collection or bulk loading time zone components. It allows multiple concurrent readers of the collection but only one writer at a time to the collection.

Exceptions

TimeoutExceptionThis is thrown if the timeout expires before acquiring the lock

See Also