Add IScriptInstance.EventsQueued to match EventsProcessed instead of asking callers to lock and directly inspect the EventQueue
parent
5a71cbe530
commit
a8a712e1f8
|
@ -114,6 +114,11 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
|
||||||
UUID AssetID { get; }
|
UUID AssetID { get; }
|
||||||
Queue EventQueue { get; }
|
Queue EventQueue { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Number of events queued for processing.
|
||||||
|
/// </summary>
|
||||||
|
long EventsQueued { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Number of events processed by this script instance.
|
/// Number of events processed by this script instance.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -173,6 +173,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||||
|
|
||||||
public Queue EventQueue { get; private set; }
|
public Queue EventQueue { get; private set; }
|
||||||
|
|
||||||
|
public long EventsQueued
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
lock (EventQueue)
|
||||||
|
return EventQueue.Count;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public long EventsProcessed { get; private set; }
|
public long EventsProcessed { get; private set; }
|
||||||
|
|
||||||
public int StartParam { get; set; }
|
public int StartParam { get; set; }
|
||||||
|
|
|
@ -526,10 +526,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
|
||||||
|
|
||||||
sb.AppendFormat("Script name : {0}\n", instance.ScriptName);
|
sb.AppendFormat("Script name : {0}\n", instance.ScriptName);
|
||||||
sb.AppendFormat("Status : {0}\n", status);
|
sb.AppendFormat("Status : {0}\n", status);
|
||||||
|
sb.AppendFormat("Queued events : {0}\n", instance.EventsQueued);
|
||||||
lock (eq)
|
|
||||||
sb.AppendFormat("Queued events : {0}\n", eq.Count);
|
|
||||||
|
|
||||||
sb.AppendFormat("Processed events : {0}\n", instance.EventsProcessed);
|
sb.AppendFormat("Processed events : {0}\n", instance.EventsProcessed);
|
||||||
sb.AppendFormat("Item UUID : {0}\n", instance.ItemID);
|
sb.AppendFormat("Item UUID : {0}\n", instance.ItemID);
|
||||||
sb.AppendFormat("Containing part name: {0}\n", instance.PrimName);
|
sb.AppendFormat("Containing part name: {0}\n", instance.PrimName);
|
||||||
|
|
Loading…
Reference in New Issue