YEngine: change some startup log messages
parent
943d0935a6
commit
2a508edcb4
|
@ -122,7 +122,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
public XMRInstQueue m_YieldQueue = new XMRInstQueue();
|
||||
public XMRInstQueue m_SleepQueue = new XMRInstQueue();
|
||||
private string m_LockedDict = "nobody";
|
||||
|
||||
private ThreadPriority m_workersPrio;
|
||||
public Yengine()
|
||||
{
|
||||
}
|
||||
|
@ -250,43 +250,29 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
return;
|
||||
}
|
||||
|
||||
ThreadPriority workersPrio = ThreadPriority.Normal;
|
||||
m_workersPrio = ThreadPriority.Normal;
|
||||
switch (priority)
|
||||
{
|
||||
case "Lowest":
|
||||
workersPrio = ThreadPriority.Lowest;
|
||||
m_workersPrio = ThreadPriority.Lowest;
|
||||
break;
|
||||
case "BelowNormal":
|
||||
workersPrio = ThreadPriority.BelowNormal;
|
||||
m_workersPrio = ThreadPriority.BelowNormal;
|
||||
break;
|
||||
case "Normal":
|
||||
workersPrio = ThreadPriority.Normal;
|
||||
m_workersPrio = ThreadPriority.Normal;
|
||||
break;
|
||||
case "AboveNormal":
|
||||
workersPrio = ThreadPriority.AboveNormal;
|
||||
m_workersPrio = ThreadPriority.AboveNormal;
|
||||
break;
|
||||
case "Highest":
|
||||
workersPrio = ThreadPriority.Highest;
|
||||
m_workersPrio = ThreadPriority.Highest;
|
||||
break;
|
||||
default:
|
||||
m_log.ErrorFormat("[YEngine] Invalid thread priority: '{0}'. Assuming Normal", priority);
|
||||
break;
|
||||
}
|
||||
m_SleepThread = StartMyThread(RunSleepThread, "Yengine sleep", ThreadPriority.Normal);
|
||||
for(int i = 0; i < numThreadScriptWorkers; i++)
|
||||
StartThreadWorker(i, workersPrio);
|
||||
|
||||
m_log.InfoFormat("[YEngine]: Enabled, {0}.{1} Meg (0x{2}) stacks",
|
||||
(m_StackSize >> 20).ToString(),
|
||||
(((m_StackSize % 0x100000) * 1000)
|
||||
>> 20).ToString("D3"),
|
||||
m_StackSize.ToString("X"));
|
||||
|
||||
m_log.InfoFormat("[YEngine]: ... {0}.{1} Meg (0x{2}) heaps",
|
||||
(m_HeapSize >> 20).ToString(),
|
||||
(((m_HeapSize % 0x100000) * 1000)
|
||||
>> 20).ToString("D3"),
|
||||
m_HeapSize.ToString("X"));
|
||||
|
||||
m_MaintenanceInterval = m_Config.GetInt("MaintenanceInterval", 10);
|
||||
|
||||
|
@ -323,6 +309,22 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
|
||||
Directory.CreateDirectory(m_ScriptBasePath);
|
||||
|
||||
string sceneName = m_Scene.Name;
|
||||
|
||||
m_log.InfoFormat("[YEngine]: Enabled for region {0}", sceneName);
|
||||
|
||||
m_log.InfoFormat("[YEngine]: {0}.{1}MB stacksize, {2}.{3}MB heapsize",
|
||||
(m_StackSize >> 20).ToString(),
|
||||
(((m_StackSize % 0x100000) * 1000)
|
||||
>> 20).ToString("D3"),
|
||||
(m_HeapSize >> 20).ToString(),
|
||||
(((m_HeapSize % 0x100000) * 1000)
|
||||
>> 20).ToString("D3"));
|
||||
|
||||
m_SleepThread = StartMyThread(RunSleepThread, "Yengine sleep" + " (" + sceneName + ")", ThreadPriority.Normal);
|
||||
for (int i = 0; i < numThreadScriptWorkers; i++)
|
||||
StartThreadWorker(i, m_workersPrio, sceneName);
|
||||
|
||||
m_Scene.EventManager.OnRezScript += OnRezScript;
|
||||
|
||||
m_Scene.StackModuleInterface<IScriptModule>(this);
|
||||
|
|
|
@ -56,11 +56,11 @@ namespace OpenSim.Region.ScriptEngine.Yengine
|
|||
}
|
||||
}
|
||||
|
||||
public void StartThreadWorker(int i, ThreadPriority priority)
|
||||
public void StartThreadWorker(int i, ThreadPriority priority, string sceneName)
|
||||
{
|
||||
Thread thd;
|
||||
if(i >= 0)
|
||||
thd = Yengine.StartMyThread(RunScriptThread, "YScript" + i.ToString(), priority);
|
||||
thd = Yengine.StartMyThread(RunScriptThread, "YScript" + i.ToString() + " (" + sceneName +")", priority);
|
||||
else
|
||||
thd = Yengine.StartMyThread(RunScriptThread, "YScript", priority);
|
||||
lock(m_WakeUpLock)
|
||||
|
|
Loading…
Reference in New Issue