Add m_syncRoot lock to MapAndArray.ContainsKey(), as discussed with jhurliman

Though this is actually thread-safe on .net 4.0 and mono today, the .net sdk states that Dictionary instance members are not guaranteed thread-safe
viewer-2-initial-appearance
Justin Clark-Casey (justincc) 2010-09-18 01:57:13 +01:00
parent 889923841c
commit 2501372d3b
1 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/*
/*
* Copyright (c) Contributors, http://opensimulator.org/
* See CONTRIBUTORS.TXT for a full list of copyright holders.
*
@ -131,6 +131,7 @@ namespace OpenSim.Framework
/// <returns>True if the key was found, otherwise false</returns>
public bool ContainsKey(TKey key)
{
lock (m_syncRoot)
return m_dict.ContainsKey(key);
}