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
This commit is contained in:
Justin Clark-Casey (justincc)
2010-09-18 01:57:13 +01:00
parent 889923841c
commit 2501372d3b

View File

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