Appearance
AcquireDisposableLock Method
Definition
- Namespace:
JASE.Extensions - Assembly:
JASE.Concurrency.dll
IDisposable AcquireDisposableLock(ReaderWriterLockSlim l, LockType type, int timeout = null)
csharp
IDisposable AcquireDisposableLock(ReaderWriterLockSlim l, LockType type, int timeout = null)Attempt to acquire a lock of the requested type in a Disposable wrapper
Parameters
| Name | Description |
|---|---|
l | ReaderWriterLockSlim to use in processing |
timeout | Timeout in milliseconds to wait for acquiring the lock |
type | Type of lock to acquire |
Returns
IDisposable if a lock was acquired, otherwise null