$Cache.ReleaseLock
Overview
Releases previously acquired lock
boolean $Cache.ReleaseLock(key: string, token: string)
Arguments
string key
Shared lock key. Required.
string token
Lock token. Required.
Returns
True if lock has released, otherwise false.
Remarks
Lock token is generated by $Cache.Lock or $Cache.TryLock method.
Example
var tokenValue = $Cache.Lock('mylock');
try {
// Locked code block
}
finally{
$Cache.ReleaseLock('mylock',tokenValue);
}
See Also
Copyright © 2010 - 2023 Emakin. All rights reserved.