Example #1
0
        // TODO it should not cause concurrency issues,
        // but still need to check out
        public void ExclusiveLock(Block block)
        {
            lock (_lock)
            {
                // We should not set shared lock again if we have already taken it
                if (_locks.ContainsKey(block))
                {
                    return;
                }

                //if (!HasExclusiveLock(block))
                //{
                _lockTable.ExclusiveLock(block);
                _locks[block] = ConcurrencyLockType.Exclusive;
                //}
            }
        }