From 134f86e8d5c414409631b25b8c6f0ee45fbd8631 Mon Sep 17 00:00:00 2001
From: David Walter Seikel
Date: Thu, 3 Nov 2016 21:44:39 +1000
Subject: Initial update to OpenSim 0.8.2.1 source code.
---
.../ScriptEngine/Interfaces/IScriptInstance.cs | 45 ++++++++++++++++++----
1 file changed, 37 insertions(+), 8 deletions(-)
(limited to 'OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs')
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index 2f5b526..e4297c4 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -28,9 +28,12 @@
using System;
using System.Collections;
using System.Collections.Generic;
+using System.Threading;
+using System.Diagnostics;
using OpenMetaverse;
using log4net;
using OpenSim.Framework;
+using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.ScriptEngine.Shared;
using OpenSim.Region.ScriptEngine.Interfaces;
@@ -49,8 +52,13 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
public interface IScriptWorkItem
{
bool Cancel();
- void Abort();
- bool Wait(TimeSpan t);
+ bool Abort();
+
+ ///
+ /// Wait for the work item to complete.
+ ///
+ /// The number of milliseconds to wait. Must be >= -1 (Timeout.Infinite).
+ bool Wait(int t);
}
///
@@ -86,24 +94,35 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
bool ShuttingDown { get; set; }
///
+ /// When stopping the script: should it remain stopped permanently (i.e., save !Running in its state)?
+ ///
+ bool StayStopped { get; set; }
+
+ ///
/// Script state
///
string State { get; set; }
///
+ /// If true then the engine is responsible for persisted state. If false then some other component may
+ /// persist state (e.g. attachments persisting in assets).
+ ///
+ bool StatePersistedHere { get; }
+
+ ///
/// Time the script was last started
///
DateTime TimeStarted { get; }
///
- /// Tick the last measurement period was started.
+ /// Collects information about how long the script was executed.
///
- long MeasurementPeriodTickStart { get; }
+ MetricsCollectorTime ExecutionTime { get; }
///
- /// Ticks spent executing in the last measurement period.
+ /// Scene part in which this script instance is contained.
///
- long MeasurementPeriodExecutionTime { get; }
+ SceneObjectPart Part { get; }
IScriptEngine Engine { get; }
UUID AppDomain { get; set; }
@@ -124,6 +143,12 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
uint LocalID { get; }
UUID AssetID { get; }
+
+ ///
+ /// Inventory item containing the script used.
+ ///
+ TaskInventoryItem ScriptTask { get; }
+
Queue EventQueue { get; }
///
@@ -139,6 +164,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
void ClearQueue();
int StartParam { get; set; }
+ WaitHandle CoopWaitHandle { get; }
+ Stopwatch ExecutionTimer { get; }
+
void RemoveState();
void Init();
@@ -154,8 +182,9 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
///
/// How many milliseconds we will wait for an existing script event to finish before
/// forcibly aborting that event.
+ /// If true then the event queue is also cleared
/// true if the script was successfully stopped, false otherwise
- bool Stop(int timeout);
+ bool Stop(int timeout, bool clearEventQueue = false);
void SetState(string state);
@@ -204,7 +233,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
void SetVars(Dictionary vars);
DetectParams GetDetectParams(int idx);
UUID GetDetectID(int idx);
- void SaveState(string assembly);
+ void SaveState();
void DestroyScriptInstance();
IScriptApi GetApi(string name);
--
cgit v1.1