aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie Thielker2014-09-21 19:24:15 +0200
committerMelanie Thielker2014-09-21 19:24:15 +0200
commit640f3f30745f77d411698739543d0eea82c44468 (patch)
tree6e942174bba92e8b65b2e273746d970c22530339 /OpenSim/Framework
parentWhen sending http requests, close the response stream instead of waiting (diff)
downloadopensim-SC-640f3f30745f77d411698739543d0eea82c44468.zip
opensim-SC-640f3f30745f77d411698739543d0eea82c44468.tar.gz
opensim-SC-640f3f30745f77d411698739543d0eea82c44468.tar.bz2
opensim-SC-640f3f30745f77d411698739543d0eea82c44468.tar.xz
A stab at brute force fixing the locking - one, make m_itemLock volatile, two,
reset the lock even if the write lock is not apparently held.
Diffstat (limited to '')
-rw-r--r--OpenSim/Framework/TaskInventoryDictionary.cs8
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 }