コード例 #1
0
        /// <summary>
        /// Initializes the supervisor.
        /// </summary>
        public static void Initialize(IStatsStrategy stats)
        {
			if (stats == null) {
				throw new ArgumentNullException ("stats");
			}

            _stats = stats;
            _taskQueue = new Queue<TaskWrapper>();
            _tasks = new List<TaskWrapper>();
            _threads = new List<TaskThread>();
            _stats.MaxThreads.RawValue = TaskMaxThreads;
            ZeroPerformanceCounters();
        }
コード例 #2
0
        /// <summary>
        /// Initializes the supervisor.
        /// </summary>
        public static void Initialize(IStatsStrategy stats)
        {
            if (stats == null)
            {
                throw new ArgumentNullException("stats");
            }

            _stats     = stats;
            _taskQueue = new Queue <TaskWrapper>();
            _tasks     = new List <TaskWrapper>();
            _threads   = new List <TaskThread>();
            _stats.MaxThreads.RawValue = TaskMaxThreads;
            ZeroPerformanceCounters();
        }