Esempio n. 1
0
        public virtual void RegionLoaded(IScene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            AuroraThreadPoolStartInfo info = new AuroraThreadPoolStartInfo
            {
                priority = ThreadPriority.Lowest, Threads = 1
            };

            threadpool      = new AuroraThreadPool(info);
            blockthreadpool = new AuroraThreadPool(info);
        }
Esempio n. 2
0
        public virtual void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            AuroraThreadPoolStartInfo info = new AuroraThreadPoolStartInfo();

            info.priority   = ThreadPriority.Lowest;
            info.Threads    = 1;
            threadpool      = new AuroraThreadPool(info);
            blockthreadpool = new AuroraThreadPool(info);

            scene.EventManager.OnStartupComplete += StartupComplete;
        }
Esempio n. 3
0
        public MaintenanceThread(ScriptEngine Engine)
        {
            m_ScriptEngine = Engine;
            EventManager   = Engine.EventManager;

            //There IS a reason we start this, even if RunInMain is enabled
            // If this isn't enabled, we run into issues with the CmdHandlerQueue,
            // as it always must be async, so we must run the pool anyway
            AuroraThreadPoolStartInfo info = new AuroraThreadPoolStartInfo();

            info.priority     = ThreadPriority.Normal;
            info.Threads      = 4;
            info.MaxSleepTime = Engine.Config.GetInt("SleepTime", 300);
            info.Threads      = 1;
            threadpool        = new AuroraThreadPool(info);

            AppDomain.CurrentDomain.AssemblyResolve += m_ScriptEngine.AssemblyResolver.OnAssemblyResolve;
        }
Esempio n. 4
0
        public MaintenanceThread(ScriptEngine Engine)
        {
            m_ScriptEngine = Engine;
            EventManager   = Engine.EventManager;

            RunInMainProcessingThread = Engine.Config.GetBoolean("RunInMainProcessingThread", false);

            RunInMainProcessingThread = false; // temporary false until code is fix to work with true

            //There IS a reason we start this, even if RunInMain is enabled
            // If this isn't enabled, we run into issues with the CmdHandlerQueue,
            // as it always must be async, so we must run the pool anyway
            AuroraThreadPoolStartInfo info = new AuroraThreadPoolStartInfo
            {
                priority           = ThreadPriority.Normal,
                Threads            = 1,
                MaxSleepTime       = Engine.Config.GetInt("SleepTime", 100),
                SleepIncrementTime = Engine.Config.GetInt("SleepIncrementTime", 1),
                Name = "Script Cmd Thread Pools"
            };

            cmdThreadpool          = new AuroraThreadPool(info);
            info.Name              = "Script Loading Thread Pools";
            scriptChangeThreadpool = new AuroraThreadPool(info);


            MaxScriptThreads = Engine.Config.GetInt("Threads", 100); // leave control threads out of user option
            AuroraThreadPoolStartInfo sinfo = new AuroraThreadPoolStartInfo
            {
                priority                  = ThreadPriority.Normal,
                Threads                   = MaxScriptThreads,
                MaxSleepTime              = Engine.Config.GetInt("SleepTime", 100),
                SleepIncrementTime        = Engine.Config.GetInt("SleepIncrementTime", 1),
                KillThreadAfterQueueClear = true,
                Name = "Script Event Thread Pools"
            };

            scriptThreadpool = new AuroraThreadPool(sinfo);

            AppDomain.CurrentDomain.AssemblyResolve += m_ScriptEngine.AssemblyResolver.OnAssemblyResolve;
        }
        public MaintenanceThread(ScriptEngine Engine)
        {
            m_ScriptEngine = Engine;
            EventManager = Engine.EventManager;

            RunInMainProcessingThread = Engine.Config.GetBoolean("RunInMainProcessingThread", false);

            RunInMainProcessingThread = false; // temporary false until code is fix to work with true

            //There IS a reason we start this, even if RunInMain is enabled
            // If this isn't enabled, we run into issues with the CmdHandlerQueue,
            // as it always must be async, so we must run the pool anyway
            AuroraThreadPoolStartInfo info = new AuroraThreadPoolStartInfo
                                                 {
                                                     priority = ThreadPriority.Normal,
                                                     Threads = 1,
                                                     MaxSleepTime = Engine.Config.GetInt("SleepTime", 100),
                                                     SleepIncrementTime = Engine.Config.GetInt("SleepIncrementTime", 1),
                                                     Name = "Script Cmd Thread Pools"
                                                 };
            cmdThreadpool = new AuroraThreadPool(info);
            info.Name = "Script Loading Thread Pools";
            scriptChangeThreadpool = new AuroraThreadPool(info);


            MaxScriptThreads = Engine.Config.GetInt("Threads", 100); // leave control threads out of user option
            AuroraThreadPoolStartInfo sinfo = new AuroraThreadPoolStartInfo
                                                  {
                                                      priority = ThreadPriority.Normal,
                                                      Threads = MaxScriptThreads,
                                                      MaxSleepTime = Engine.Config.GetInt("SleepTime", 100),
                                                      SleepIncrementTime = Engine.Config.GetInt("SleepIncrementTime", 1),
                                                      KillThreadAfterQueueClear = true,
                                                      Name = "Script Event Thread Pools"
                                                  };
            scriptThreadpool = new AuroraThreadPool(sinfo);

            AppDomain.CurrentDomain.AssemblyResolve += m_ScriptEngine.AssemblyResolver.OnAssemblyResolve;
        }
Esempio n. 6
0
        public virtual void RegionLoaded(IScene scene)
        {
            if (!m_Enabled)
                return;

            AuroraThreadPoolStartInfo info = new AuroraThreadPoolStartInfo
                                                 {priority = ThreadPriority.Lowest, Threads = 1};
            threadpool = new AuroraThreadPool(info);
            blockthreadpool = new AuroraThreadPool(info);
        }