ReleaseLockAsync¶
Asynchronously releases a previously acquired lock.
1 | |
Parameters¶
string key
The shared lock key. Required.
string token
The token returned when the lock was acquired. Required.
Returns¶
A promise containing true if the lock was released successfully; otherwise, false.
Remarks¶
The key and token must match the values used by $Cache.LockAsync or $Cache.TryLockAsync. A lock can be released only once.
Releasing a lock in a finally block so it is also released when the protected operation fails¶
1 2 3 4 5 6 7 8 9 10 11 12 | |