diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 68 |
1 files changed, 39 insertions, 29 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index 0dc1ade..f27a144 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -173,24 +173,24 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
173 | ThreadPriority prio = ThreadPriority.BelowNormal; | 173 | ThreadPriority prio = ThreadPriority.BelowNormal; |
174 | switch (priority) | 174 | switch (priority) |
175 | { | 175 | { |
176 | case "Lowest": | 176 | case "Lowest": |
177 | prio = ThreadPriority.Lowest; | 177 | prio = ThreadPriority.Lowest; |
178 | break; | 178 | break; |
179 | case "BelowNormal": | 179 | case "BelowNormal": |
180 | prio = ThreadPriority.BelowNormal; | 180 | prio = ThreadPriority.BelowNormal; |
181 | break; | 181 | break; |
182 | case "Normal": | 182 | case "Normal": |
183 | prio = ThreadPriority.Normal; | 183 | prio = ThreadPriority.Normal; |
184 | break; | 184 | break; |
185 | case "AboveNormal": | 185 | case "AboveNormal": |
186 | prio = ThreadPriority.AboveNormal; | 186 | prio = ThreadPriority.AboveNormal; |
187 | break; | 187 | break; |
188 | case "Highest": | 188 | case "Highest": |
189 | prio = ThreadPriority.Highest; | 189 | prio = ThreadPriority.Highest; |
190 | break; | 190 | break; |
191 | default: | 191 | default: |
192 | m_log.ErrorFormat("[XEngine] Invalid thread priority: '{0}'. Assuming BelowNormal", priority); | 192 | m_log.ErrorFormat("[XEngine] Invalid thread priority: '{0}'. Assuming BelowNormal", priority); |
193 | break; | 193 | break; |
194 | } | 194 | } |
195 | 195 | ||
196 | lock (m_ScriptEngines) | 196 | lock (m_ScriptEngines) |
@@ -659,24 +659,31 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
659 | return new XWorkItem(m_ThreadPool.QueueWorkItem( | 659 | return new XWorkItem(m_ThreadPool.QueueWorkItem( |
660 | new WorkItemCallback(this.ProcessEventHandler), | 660 | new WorkItemCallback(this.ProcessEventHandler), |
661 | parms)); | 661 | parms)); |
662 | } | 662 | } |
663 | 663 | ||
664 | // | 664 | /// <summary> |
665 | // The main script engine worker | 665 | /// Process a previously posted script event. |
666 | // | 666 | /// </summary> |
667 | /// <param name="parms"></param> | ||
668 | /// <returns></returns> | ||
667 | private object ProcessEventHandler(object parms) | 669 | private object ProcessEventHandler(object parms) |
668 | { | 670 | { |
669 | CultureInfo USCulture = new CultureInfo("en-US"); | 671 | CultureInfo USCulture = new CultureInfo("en-US"); |
670 | Thread.CurrentThread.CurrentCulture = USCulture; | 672 | Thread.CurrentThread.CurrentCulture = USCulture; |
671 | 673 | ||
672 | IScriptInstance instance = (ScriptInstance) parms; | 674 | IScriptInstance instance = (ScriptInstance) parms; |
675 | |||
676 | //m_log.DebugFormat("[XENGINE]: Processing event for {0}", instance); | ||
673 | 677 | ||
674 | return instance.EventProcessor(); | 678 | return instance.EventProcessor(); |
675 | } | 679 | } |
676 | 680 | ||
677 | // | 681 | /// <summary> |
678 | // Post event to an entire prim | 682 | /// Post event to an entire prim |
679 | // | 683 | /// </summary> |
684 | /// <param name="localID"></param> | ||
685 | /// <param name="p"></param> | ||
686 | /// <returns></returns> | ||
680 | public bool PostObjectEvent(uint localID, EventParams p) | 687 | public bool PostObjectEvent(uint localID, EventParams p) |
681 | { | 688 | { |
682 | bool result = false; | 689 | bool result = false; |
@@ -699,9 +706,12 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
699 | return result; | 706 | return result; |
700 | } | 707 | } |
701 | 708 | ||
702 | // | 709 | /// <summary> |
703 | // Post an event to a single script | 710 | /// Post an event to a single script |
704 | // | 711 | /// </summary> |
712 | /// <param name="itemID"></param> | ||
713 | /// <param name="p"></param> | ||
714 | /// <returns></returns> | ||
705 | public bool PostScriptEvent(UUID itemID, EventParams p) | 715 | public bool PostScriptEvent(UUID itemID, EventParams p) |
706 | { | 716 | { |
707 | if (m_Scripts.ContainsKey(itemID)) | 717 | if (m_Scripts.ContainsKey(itemID)) |