Minor cleanup.

This commit is contained in:
Jeff Ames
2008-02-20 18:38:20 +00:00
parent f02b314765
commit a8cfbbe963
206 changed files with 345 additions and 445 deletions

View File

@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
// Console.WriteLine("Scripts loaded in this Appdomain: " + currentAD.ScriptsLoaded);
return currentAD;
} // lock
}
}
private int AppDomainNameCount;
@@ -184,8 +184,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
#endif
}
}
} // foreach
} // lock
}
}
}
public IScript LoadScript(string FileName)
@@ -235,8 +235,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
ads.ScriptsWaitingUnload++;
break;
}
} // foreach
} // lock
}
}
UnloadAppDomains(); // Outsite lock, has its own GetLock
}

View File

@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
@@ -64,7 +64,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
cmdHandlerThreadCycleSleepms = m_ScriptEngine.ScriptConfigSource.GetInt("AsyncLLCommandLoopms", 50);
}
~AsyncLSLCommandManager()
{
// Shut down thread
@@ -215,7 +214,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
// Time has passed?
if (ts.next < DateTime.Now.Ticks)
{
Console.WriteLine("Time has passed: Now: " + DateTime.Now.Ticks + ", Passed: " + ts.next);
// Add it to queue
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(ts.localID, ts.itemID, "timer", EventQueueManager.llDetectNull,
@@ -226,7 +224,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
ts.next = DateTime.Now.Ticks + ts.interval;
}
}
} // lock
}
}
#endregion
@@ -272,7 +270,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}
httpInfo = iHttpReq.GetNextCompletedRequest();
}
}
@@ -307,11 +304,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
rInfo.GetLocalID(), rInfo.GetItemID(), "remote_data", EventQueueManager.llDetectNull, resobj
);
}
rInfo = xmlrpc.GetNextCompletedRequest();
}
SendRemoteDataRequest srdInfo = xmlrpc.GetNextCompletedSRDRequest();
@@ -332,14 +327,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
m_ScriptEngine.m_EventQueueManager.AddToScriptQueue(
srdInfo.m_localID, srdInfo.m_itemID, "remote_data", EventQueueManager.llDetectNull, resobj
);
}
srdInfo = xmlrpc.GetNextCompletedSRDRequest();
}
}
}
@@ -372,7 +363,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
lInfo.GetLocalID(), lInfo.GetItemID(), "listen", EventQueueManager.llDetectNull, resobj
);
}
}
}
}

View File

@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY

View File

@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY

View File

@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY

View File

@@ -219,8 +219,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
GotItem = true;
break;
}
} // go through queue
} // lock
}
}
if (GotItem == true)
{
@@ -305,7 +305,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
eventQueueManager.ReleaseLock(QIS.localID);
}
}
} // Something in queue
}
}
}
catch (ThreadAbortException tae)
@@ -316,8 +316,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
{
eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: Exception in EventQueueThreadLoop: " + e.ToString());
}
} // while
} // try
}
}
catch (ThreadAbortException)
{
//myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread killed: " + tae.Message);

View File

@@ -130,9 +130,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
if (m_ScriptEngine != null)
{
//
// Re-reading config every x seconds
//
if (m_ScriptEngine.RefreshConfigFilens > 0)
{
// Check if its time to re-read config
@@ -145,15 +143,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
}
}
//
// Adjust number of running script threads if not correct
//
if (m_ScriptEngine.m_EventQueueManager != null)
m_ScriptEngine.m_EventQueueManager.AdjustNumberOfScriptThreads();
//
// Check if any script has exceeded its max execution time
//
if (m_ScriptEngine.m_EventQueueManager != null && m_ScriptEngine.m_EventQueueManager.EnforceMaxExecutionTime)
{
// We are enforcing execution time
@@ -165,7 +159,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase
Last_maxFunctionExecutionTimens = DateTime.Now.Ticks; // Reset time
}
}
} // m_ScriptEngine != null
}
}
}
catch (Exception ex)

View File

@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY

View File

@@ -13,7 +13,7 @@
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS AS IS AND ANY
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY