Appearance
TryAcquireLock Method
Definition
- Namespace:
JASE.Extensions - Assembly:
JASE.Concurrency.dll
Overloads
| Name | Description |
|---|---|
bool TryAcquireLock(ReaderWriterLockSlim l, LockType type) | Attempts to acquire a lock of the requested type |
bool TryAcquireLock(ReaderWriterLockSlim l, LockType type, int timeout) | Attempt to acquire a lock of the requested type |
bool TryAcquireLock(ReaderWriterLockSlim l, LockType type)
csharp
bool TryAcquireLock(ReaderWriterLockSlim l, LockType type)Attempts to acquire a lock of the requested type
Parameters
| Name | Description |
|---|---|
l | ReaderWriterLockSlim to use in processing |
type | Type of lock to acquire |
Returns
Boolean true if a lock was acquired, otherwise false
bool TryAcquireLock(ReaderWriterLockSlim l, LockType type, int timeout)
csharp
bool TryAcquireLock(ReaderWriterLockSlim l, LockType type, int timeout)Attempt to acquire a lock of the requested type
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
Boolean true if a lock was acquired, otherwise false