misc clean up of locks and add more readonly.

UtilizationStatistics.cs: "deep copy" statistics out
This commit is contained in:
nopjmp
2019-12-16 19:50:19 -06:00
parent 392e1395c4
commit 8d0ea08ca7
11 changed files with 315 additions and 302 deletions

View File

@@ -70,17 +70,17 @@ namespace OpenMetaverse
public int Count
{
get { return Dictionary.Count; }
get { lock (syncObject) return Dictionary.Count; }
}
public bool ContainsKey(TKey key)
{
return Dictionary.ContainsKey(key);
lock (syncObject) return Dictionary.ContainsKey(key);
}
public bool TryGetValue(TKey key, out TValue value)
{
return Dictionary.TryGetValue(key, out value);
lock (syncObject) return Dictionary.TryGetValue(key, out value);
}
public void ForEach(Action<TValue> action)
@@ -152,7 +152,7 @@ namespace OpenMetaverse
public TValue this[TKey key]
{
get { return Dictionary[key]; }
get { lock (syncObject) return Dictionary[key]; }
}
}
}