Open sandboxFocus

Method GetLock

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.

Declaration
ILockHandle GetLock(string key)
Parameters
Type Name Description
string key

The name of the lock.

Returns
Type Description
ILockHandle

A handle to the lock named key.