public override void ReleaseItemExclusive (HttpContext context,
string id,
object lockId)
{
EnsureGoodId (id, true);
string CacheId = CachePrefix + id;
InProcSessionItem item = HttpRuntime.InternalCache [CacheId] as InProcSessionItem;
if (item == null || lockId == null || lockId.GetType() != typeof(Int32) || item.lockId != (Int32)lockId)
return;
bool locked = false;
try {
if (item.rwlock.TryEnterWriteLock (lockAcquireTimeout))
locked = true;
else
throw new ApplicationException ("Failed to acquire lock");
item.locked = false;
} catch {
throw;
} finally {
if (locked)
item.rwlock.ExitWriteLock ();
}
}