VTime Zone CollectionAcquire Reader Lock 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: 2025.1.9.0
Assembly: EWSoftware.PDI.Data (in EWSoftware.PDI.Data.dll) Version: 2025.1.9.0
C#
public void AcquireReaderLock(
int timeout,
bool upgradeable = false
)VB
Public Sub AcquireReaderLock (
timeout As Integer,
Optional upgradeable As Boolean = false
)C++
public:
void AcquireReaderLock(
int timeout,
bool upgradeable = false
)F#
member AcquireReaderLock :
timeout : int *
?upgradeable : bool
(* Defaults:
let _upgradeable = defaultArg upgradeable false
*)
-> unit 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
| TimeoutException | This is thrown if the timeout expires before acquiring the lock |