From 7ef09a12020f1665bcd4e99fd420d411d5f4d95d Mon Sep 17 00:00:00 2001 From: Tedd Hansen Date: Sun, 30 Dec 2007 16:32:29 +0000 Subject: Added comments to ScriptEngine classes that explains what their purpose is --- .../ScriptEngine/DotNetEngine/EventQueueManager.cs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs') diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs index 2d0d69d..e2b11cc 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/EventQueueManager.cs @@ -44,6 +44,28 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine [Serializable] internal class EventQueueManager { + + // + // Class is instanced in "ScriptEngine" and used by "EventManager" also instanced in "ScriptEngine". + // + // Class purpose is to queue and execute functions that are received by "EventManager": + // - allowing "EventManager" to release its event thread immediately, thus not interrupting server execution. + // - allowing us to prioritize and control execution of script functions. + // Class can use multiple threads for simultaneous execution. Mutexes are used for thread safety. + // + // 1. Hold an execution queue for scripts + // 2. Use threads to process queue, each thread executes one script function on each pass. + // 3. Catch any script error and process it + // + // + // Notes: + // * Current execution load balancing is optimized for 1 thread, and can cause unfair execute balancing between scripts. + // Not noticeable unless server is under high load. + // * This class contains the number of threads used for script executions. Since we are not microthreading scripts yet, + // increase number of threads to allow more concurrent script executions in OpenSim. + // + + /// /// List of threads processing event queue /// -- cgit v1.1