...
string token
Lock token. Required.
Example
Code Block | ||
---|---|---|
| ||
$Cache.Set('myint', 4);
var tokenValue = $Cache.TryLock('myint');
if (tokenValue != null) {
// Locked code block
$Cache.ReleaseLock('myint',tokenValue1);
} else {
// Already locked
} |
...
Returns
...
Remarks
Lock token is generated by $Cache.Lock or $Cache.TryLock method.
Example
Code Block | ||
---|---|---|
| ||
$Cache.Set('myint', 4); var tokenValue = $Cache.TryLockLock('myintmylock'); if (tokenValue != null) try { // Locked code block } finally{ $Cache.ReleaseLock('myintmylock',tokenValue1tokenValue); } else { // Already locked }} |