From 8c271802ac5cd4a6904140855f95f9a26d7d3c95 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Wed, 1 Feb 2012 00:17:02 +0000 Subject: [PATCH] Add count of events queued for a particular script in "scripts show" console command --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 459821bcb6..13c5cd959d 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs @@ -428,10 +428,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine status = "running"; } - MainConsole.Instance.OutputFormat( - "{0}.{1}, item UUID {2}, prim UUID {3} @ {4} ({5})", - instance.PrimName, instance.ScriptName, instance.ItemID, instance.ObjectID, - sop.AbsolutePosition, status); + Queue eq = instance.EventQueue; + + lock (eq) + { + MainConsole.Instance.OutputFormat( + "{0}.{1}, queued events = {2}, item UUID {3}, prim UUID {4} @ {5} ({6})", + instance.PrimName, instance.ScriptName, eq.Count, instance.ItemID, instance.ObjectID, + sop.AbsolutePosition, status); + } } private void HandleSuspendScript(IScriptInstance instance)