private static void TryRemoveLock(string name, LockObject o) { if (o.LockCountAdd(-1).LockCount == 0) { LockDict.TryRemove(name, out _); } }