Esempio n. 1
0
            /// <summary>
            /// The logic of the thread.
            /// </summary>
            private void Maintain()
            {
                while (!_stopThread)
                {
                    try
                    {
                        Thread.Sleep((int)_interval);

                        // if pool is initialized, then
                        // run the maintenance method on itself
                        if (_pool.Initialized)
                        {
                            _pool.SelfMaintain();
                        }
                    }
                    //catch(ThreadInterruptedException) { } //MaxM: When SockIOPool.getInstance().shutDown() is called, this exception will be raised and can be safely ignored.
                    catch (Exception)
                    {
                    }
                }
            }