aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
diff options
context:
space:
mode:
authorMelanie2019-07-27 12:10:28 +0100
committerMelanie2019-07-27 12:10:28 +0100
commitd6723dab37d86af22c712e2705af34fd2c82b174 (patch)
tree041be46cdcc778660fe3083794dabd2a2805283f /OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
parentWhen using FSAssets, the HGAssetService would still use AssetService. (diff)
parentmantis 8563: do not modify collection inside a loop on it a foreach on it (diff)
downloadopensim-SC-d6723dab37d86af22c712e2705af34fd2c82b174.zip
opensim-SC-d6723dab37d86af22c712e2705af34fd2c82b174.tar.gz
opensim-SC-d6723dab37d86af22c712e2705af34fd2c82b174.tar.bz2
opensim-SC-d6723dab37d86af22c712e2705af34fd2c82b174.tar.xz
Merge branch 'master' of brain.opensimulator.org:/var/git/opensim
Diffstat (limited to 'OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs27
1 files changed, 25 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs b/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
index 6acc293..e1f8c4c 100644
--- a/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
+++ b/OpenSim/Region/ScriptEngine/YEngine/XMREngine.cs
@@ -1535,15 +1535,38 @@ namespace OpenSim.Region.ScriptEngine.Yengine
1535 */ 1535 */
1536 public void QueueToStart(XMRInstance inst) 1536 public void QueueToStart(XMRInstance inst)
1537 { 1537 {
1538 if(inst.m_IState != XMRInstState.ONSTARTQ) 1538 if (inst.m_IState != XMRInstState.ONSTARTQ)
1539 throw new Exception("bad state"); 1539 throw new Exception("bad state");
1540 1540
1541 lock(m_StartQueue) 1541 lock (m_StartQueue)
1542 m_StartQueue.InsertTail(inst); 1542 m_StartQueue.InsertTail(inst);
1543 1543
1544 WakeUpOne(); 1544 WakeUpOne();
1545 } 1545 }
1546 1546
1547 public void QueueToYield(XMRInstance inst)
1548 {
1549 if (inst.m_IState != XMRInstState.ONYIELDQ)
1550 throw new Exception("bad state");
1551
1552 lock (m_YieldQueue)
1553 m_YieldQueue.InsertTail(inst);
1554
1555 WakeUpOne();
1556 }
1557
1558 public void RemoveFromSleep(XMRInstance inst)
1559 {
1560 lock (m_SleepQueue)
1561 {
1562 if (inst.m_IState != XMRInstState.ONSLEEPQ)
1563 return;
1564
1565 m_SleepQueue.Remove(inst);
1566 inst.m_IState = XMRInstState.REMDFROMSLPQ;
1567 }
1568 }
1569
1547 /** 1570 /**
1548 * @brief A script may be sleeping, in which case we wake it. 1571 * @brief A script may be sleeping, in which case we wake it.
1549 */ 1572 */