Beispiel #1
0
        public PerformanceBalancer(IThreadCollection threadCollection, IWorkItemCollection workItemCollection, PerformanceBalanceSettings settings)
        {
            settings.Check();

            this.threadCollection = threadCollection;

            this.workItemCollection = workItemCollection;

            this.strategies = (settings.PerformanceBalancerStrategies ?? new List <IPerformanceBalancerStrategy>()).ToArray();

            this.settings = settings;
        }
        public PerformanceBalancerThread(PerformanceBalancer performanceBalancer, PerformanceBalanceSettings settings)
            : base()
        {
            this.settings = settings;

            this.performanceBalancer = performanceBalancer;

            managedThread.IsBackground = true;
            managedThread.Name         = "PerformanceBalancerThread";

            managedThread.Start();
        }