예제 #1
0
        /// <summary>
        /// Конструктор ThreadPoolThreadLocals
        /// </summary>
        /// <param name="globals">Глобальные данные пула</param>
        /// <param name="createLocalQueue">Создавать ли локальную очередь</param>
        public ThreadPoolThreadLocals(ThreadPoolGlobals globals, bool createLocalQueue)
        {
            TurboContract.Requires(globals != null, conditionString: "globals != null");

            Globals = globals;
            if (createLocalQueue)
            {
                LocalQueue = new ThreadPoolLocalQueue();
            }
            _isDisposed = false;
        }
        /// <summary>
        /// Конструктор ThreadPoolThreadLocals
        /// </summary>
        /// <param name="globals">Глобальные данные пула</param>
        /// <param name="createLocalQueue">Создавать ли локальную очередь</param>
        public ThreadPoolThreadLocals(ThreadPoolGlobals globals, bool createLocalQueue)
        {
            Contract.Requires(globals != null);

            Globals = globals;
            if (createLocalQueue)
            {
                LocalQueue = new ThreadPoolLocalQueue();
            }
            _isDisposed = false;
        }