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-safeviewer-2-initial-appearance
							parent
							
								
									889923841c
								
							
						
					
					
						commit
						2501372d3b
					
				| 
						 | 
				
			
			@ -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>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue