Example #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public MessageBusBase(string name)
        {
            _name = name;

            #if Matrix_Diagnostics
            _monitor = new InstanceMonitor(this);
            #endif

            _defaultThreadPool = new ThreadPoolFastEx(name + ".DefaultThreadPool");

            _defaultThreadPool.MinimumThreadsCount = 5;
            _defaultThreadPool.MaximumThreadsCount = 10;
        }
Example #2
0
        public virtual void Dispose()
        {
            _isDisposed = true;

            ThreadPoolFastEx threadPool = _defaultThreadPool;
            if (threadPool != null)
            {
                threadPool.Dispose();
                _defaultThreadPool = null;
            }
        }