An implementation of ILockManager in which every instance of the LocalLockManager has its own set of named locks that are not shared in any way with other instances. The LocalLockManager can be used to synchronize the execution of methods in the current process and AppDomain.
Implements
Namespace: PostSharp.Patterns.Caching.Locking
Assembly: PostSharp.Patterns.Caching.dll
Syntax
public sealed class LocalLockManager : ILockManagerRemarks
Assign an instance to the LockManager property of each profile that needs locking. Since each cached method uses a single profile, sharing an instance between profiles or not makes no difference. Lock names are compared without regard to case.
Constructors
| Name | Description |
|---|---|
| LocalLockManager() |
Methods
| Name | Description |
|---|---|
| GetLock(string) | Gets a handle to a named lock. This method must return immediately. Waiting, if any, must be done in the Acquire(TimeSpan, CancellationToken) method. |