Slight variation on the locking scheme: now locking always, except the ForEach, which gets a copy of the Array. I think the ForEach was the big gorilla.
parent
f29bd8036d
commit
3f78ff6ee0
|
@ -247,16 +247,16 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
|||
|
||||
////return success;
|
||||
|
||||
//lock (m_sync)
|
||||
// return Dictionary2.TryGetValue(key, out value);
|
||||
|
||||
try
|
||||
{
|
||||
lock (m_sync)
|
||||
return Dictionary2.TryGetValue(key, out value);
|
||||
}
|
||||
catch { }
|
||||
value = null;
|
||||
return false;
|
||||
|
||||
//try
|
||||
//{
|
||||
// return Dictionary2.TryGetValue(key, out value);
|
||||
//}
|
||||
//catch { }
|
||||
//value = null;
|
||||
//return false;
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue