PostSharp6.6//API Reference/Post­Sharp.​Patterns.​Caching.​Locking Namespace/Local­Lock­Manager Class/Local­Lock­Manager Methods/Local­Lock­Manager.​Get­Lock Method

LocalLockManager.GetLock Method

Gets a handle to a named lock. This method must return immediately. Waiting, if any, must be done in the Acquire(TimeSpan, CancellationToken) method.

Namespace:  PostSharp.Patterns.Caching.Locking
Assembly:  PostSharp.Patterns.Caching (in PostSharp.Patterns.Caching.dll) Version: 6.6.7.0 (6.6.7.0)
Syntax
C#
public ILockHandle GetLock(
	string key
)

Parameters

key
Type: System.String
The name of the lock.

Return Value

Type: ILockHandle
A handle to the lock named key.

Implements

ILockManager.GetLock(String)
See Also