aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XMREngine/XMRScriptThread.cs
diff options
context:
space:
mode:
authorUbitUmarov2018-02-03 08:08:59 +0000
committerUbitUmarov2018-02-03 08:08:59 +0000
commit04a8ec518d5d7d8b69b62cd31c192c60d953b6df (patch)
tree62f0d7556770ac8fb357d7345946f260bd09049c /OpenSim/Region/ScriptEngine/XMREngine/XMRScriptThread.cs
parentupdate opensim.ini.example with XMRengine information (diff)
downloadopensim-SC-04a8ec518d5d7d8b69b62cd31c192c60d953b6df.zip
opensim-SC-04a8ec518d5d7d8b69b62cd31c192c60d953b6df.tar.gz
opensim-SC-04a8ec518d5d7d8b69b62cd31c192c60d953b6df.tar.bz2
opensim-SC-04a8ec518d5d7d8b69b62cd31c192c60d953b6df.tar.xz
XMR: there is no need for a slice thread, it also causes timing issues; BelowNormal mb 2 Below on win; cosmetics
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/XMREngine/XMRScriptThread.cs17
1 files changed, 9 insertions, 8 deletions
diff --git a/OpenSim/Region/ScriptEngine/XMREngine/XMRScriptThread.cs b/OpenSim/Region/ScriptEngine/XMREngine/XMRScriptThread.cs
index 933b478..a1238db 100644
--- a/OpenSim/Region/ScriptEngine/XMREngine/XMRScriptThread.cs
+++ b/OpenSim/Region/ScriptEngine/XMREngine/XMRScriptThread.cs
@@ -39,7 +39,8 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
39 * Each sits in a loop checking the Start and Yield queues for 39 * Each sits in a loop checking the Start and Yield queues for
40 * a script to run and calls the script as a microthread. 40 * a script to run and calls the script as a microthread.
41 */ 41 */
42 public class XMRScriptThread { 42 public class XMRScriptThread
43 {
43 private static int m_WakeUpOne = 0; 44 private static int m_WakeUpOne = 0;
44 public static object m_WakeUpLock = new object(); 45 public static object m_WakeUpLock = new object();
45 private static Dictionary<Thread,XMRScriptThread> m_AllThreads = new Dictionary<Thread,XMRScriptThread> (); 46 private static Dictionary<Thread,XMRScriptThread> m_AllThreads = new Dictionary<Thread,XMRScriptThread> ();
@@ -81,10 +82,11 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
81 { 82 {
82 engine = eng; 83 engine = eng;
83 m_Continuations = engine.uThreadCtor.DeclaringType == typeof (ScriptUThread_Con); 84 m_Continuations = engine.uThreadCtor.DeclaringType == typeof (ScriptUThread_Con);
84 thd = XMREngine.StartMyThread (RunScriptThread, "xmrengine script", ThreadPriority.BelowNormal); 85// thd = XMREngine.StartMyThread (RunScriptThread, "xmrengine script", ThreadPriority.BelowNormal);
85 lock (m_AllThreads) { 86 thd = XMREngine.StartMyThread (RunScriptThread, "xmrengine script", ThreadPriority.Normal);
87 lock (m_AllThreads)
86 m_AllThreads.Add (thd, this); 88 m_AllThreads.Add (thd, this);
87 } 89
88 } 90 }
89 91
90 public void SuspendThread() 92 public void SuspendThread()
@@ -104,18 +106,17 @@ namespace OpenSim.Region.ScriptEngine.XMREngine
104 m_Exiting = true; 106 m_Exiting = true;
105 WakeUpScriptThread(); 107 WakeUpScriptThread();
106 thd.Join(); 108 thd.Join();
107 lock (m_AllThreads) { 109 lock (m_AllThreads)
108 m_AllThreads.Remove (thd); 110 m_AllThreads.Remove (thd);
109 } 111
110 thd = null; 112 thd = null;
111 } 113 }
112 114
113 public void TimeSlice() 115 public void TimeSlice()
114 { 116 {
115 XMRInstance instance = m_RunInstance; 117 XMRInstance instance = m_RunInstance;
116 if (instance != null) { 118 if (instance != null)
117 instance.suspendOnCheckRunTemp = true; 119 instance.suspendOnCheckRunTemp = true;
118 }
119 } 120 }
120 121
121 /** 122 /**