diff options
Diffstat (limited to 'OpenSim/Framework/TaskInventoryDictionary.cs')
-rw-r--r-- | OpenSim/Framework/TaskInventoryDictionary.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/OpenSim/Framework/TaskInventoryDictionary.cs b/OpenSim/Framework/TaskInventoryDictionary.cs index 62ecbd1..2c20ef7 100644 --- a/OpenSim/Framework/TaskInventoryDictionary.cs +++ b/OpenSim/Framework/TaskInventoryDictionary.cs | |||
@@ -62,7 +62,7 @@ namespace OpenSim.Framework | |||
62 | /// <value> | 62 | /// <value> |
63 | /// An advanced lock for inventory data | 63 | /// An advanced lock for inventory data |
64 | /// </value> | 64 | /// </value> |
65 | private System.Threading.ReaderWriterLockSlim m_itemLock = new System.Threading.ReaderWriterLockSlim(); | 65 | private volatile System.Threading.ReaderWriterLockSlim m_itemLock = new System.Threading.ReaderWriterLockSlim(); |
66 | 66 | ||
67 | /// <summary> | 67 | /// <summary> |
68 | /// Are we readlocked by the calling thread? | 68 | /// Are we readlocked by the calling thread? |
@@ -143,8 +143,8 @@ namespace OpenSim.Framework | |||
143 | while (!m_itemLock.TryEnterReadLock(60000)) | 143 | while (!m_itemLock.TryEnterReadLock(60000)) |
144 | { | 144 | { |
145 | m_log.Error("Thread lock detected while trying to aquire READ lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed."); | 145 | m_log.Error("Thread lock detected while trying to aquire READ lock in TaskInventoryDictionary. Locked by thread " + LockedByThread.Name + ". I'm going to try to solve the thread lock automatically to preserve region stability, but this needs to be fixed."); |
146 | if (m_itemLock.IsWriteLockHeld) | 146 | //if (m_itemLock.IsWriteLockHeld) |
147 | { | 147 | //{ |
148 | m_itemLock = new System.Threading.ReaderWriterLockSlim(); | 148 | m_itemLock = new System.Threading.ReaderWriterLockSlim(); |
149 | // System.Console.WriteLine("------------------------------------------"); | 149 | // System.Console.WriteLine("------------------------------------------"); |
150 | // System.Console.WriteLine("My call stack:\n" + Environment.StackTrace); | 150 | // System.Console.WriteLine("My call stack:\n" + Environment.StackTrace); |
@@ -153,7 +153,7 @@ namespace OpenSim.Framework | |||
153 | // System.Console.WriteLine("------------------------------------------"); | 153 | // System.Console.WriteLine("------------------------------------------"); |
154 | // LockedByThread = null; | 154 | // LockedByThread = null; |
155 | // ReadLockers.Clear(); | 155 | // ReadLockers.Clear(); |
156 | } | 156 | //} |
157 | } | 157 | } |
158 | // ReadLockers[Thread.CurrentThread] = Environment.StackTrace; | 158 | // ReadLockers[Thread.CurrentThread] = Environment.StackTrace; |
159 | } | 159 | } |