PostSharp6.4/API Reference/Post­Sharp.​Patterns.​Caching.​Locking Namespace/ILock­Manager Interface/ILock­Manager Methods/ILock­Manager.​Get­Lock Method

ILockManager.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.4.6.0 (6.4.6.0)
Syntax
C#
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.
See Also