Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

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

$Cache.Set('myint', 4);
var tokenValue = $Cache.TryLock('myint');
if (tokenValue != null) {
  // Locked code block 
  $Cache.ReleaseLock('myint',tokenValue1);
} else {
  // Already locked  
}

See Also

  • No labels