diff options
author | Melanie Thielker | 2008-08-28 00:37:22 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-08-28 00:37:22 +0000 |
commit | bf4d1fbb8dbfe3470d4381542e586e44d84c2a01 (patch) | |
tree | 42f43e101b5b092cdc69f36ea1afc8c7d0f3f1fb /OpenSim/Region/ScriptEngine/Interfaces | |
parent | Remove self-referential build dependency that breaks build under (diff) | |
download | opensim-SC-bf4d1fbb8dbfe3470d4381542e586e44d84c2a01.zip opensim-SC-bf4d1fbb8dbfe3470d4381542e586e44d84c2a01.tar.gz opensim-SC-bf4d1fbb8dbfe3470d4381542e586e44d84c2a01.tar.bz2 opensim-SC-bf4d1fbb8dbfe3470d4381542e586e44d84c2a01.tar.xz |
Refactor IScriptInstance / IScriptEngine to use a generic IScriptWorkItem,
which is a thin wrapper around a IWorkItemResult from the SmartThreadPool.
However, it is very easy to reimplement on top of basic threading and therefore
makes the IScriptInstance class independent of the specific threading
implementation.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs index 7c22eed..6b3804c 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptEngine.cs | |||
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
57 | bool GetScriptState(LLUUID itemID); | 57 | bool GetScriptState(LLUUID itemID); |
58 | void SetState(LLUUID itemID, string newState); | 58 | void SetState(LLUUID itemID, string newState); |
59 | int GetStartParameter(LLUUID itemID); | 59 | int GetStartParameter(LLUUID itemID); |
60 | IWorkItemResult QueueEventHandler(object parms); | 60 | IScriptWorkItem QueueEventHandler(object parms); |
61 | 61 | ||
62 | DetectParams GetDetectParams(LLUUID item, int number); | 62 | DetectParams GetDetectParams(LLUUID item, int number); |
63 | } | 63 | } |
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs index 03a3802..3aeb602 100644 --- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs | |||
@@ -43,6 +43,13 @@ namespace OpenSim.Region.ScriptEngine.Interfaces | |||
43 | AttachmentCrossing = 2 | 43 | AttachmentCrossing = 2 |
44 | } | 44 | } |
45 | 45 | ||
46 | public interface IScriptWorkItem | ||
47 | { | ||
48 | bool Cancel(); | ||
49 | void Abort(); | ||
50 | bool Wait(TimeSpan t); | ||
51 | } | ||
52 | |||
46 | public interface IScriptInstance | 53 | public interface IScriptInstance |
47 | { | 54 | { |
48 | bool Running { get; set; } | 55 | bool Running { get; set; } |