コード例 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public SchedulableRequest(SchedulingData collection, BuildRequest request, SchedulableRequest parent)
        {
            ErrorUtilities.VerifyThrowArgumentNull(collection, "collection");
            ErrorUtilities.VerifyThrowArgumentNull(request, "request");
            ErrorUtilities.VerifyThrow((parent == null) || (parent._schedulingData == collection), "Parent request does not belong to the same collection.");

            _schedulingData         = collection;
            _request                = request;
            _parent                 = parent;
            _assignedNodeId         = -1;
            _requestsWeAreBlockedBy = new Dictionary <BlockingRequestKey, SchedulableRequest>();
            _requestsWeAreBlocking  = new HashSet <SchedulableRequest>();

            _timeRecords = new Dictionary <SchedulableRequestState, ScheduleTimeRecord>(5);
            _timeRecords[SchedulableRequestState.Unscheduled] = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Blocked]     = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Yielding]    = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Executing]   = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Ready]       = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Completed]   = new ScheduleTimeRecord();

            ChangeToState(SchedulableRequestState.Unscheduled);
        }
コード例 #2
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public SchedulableRequest(SchedulingData collection, BuildRequest request, SchedulableRequest parent)
        {
            ErrorUtilities.VerifyThrowArgumentNull(collection, "collection");
            ErrorUtilities.VerifyThrowArgumentNull(request, "request");
            ErrorUtilities.VerifyThrow((parent == null) || (parent._schedulingData == collection), "Parent request does not belong to the same collection.");

            _schedulingData = collection;
            _request = request;
            _parent = parent;
            _assignedNodeId = -1;
            _requestsWeAreBlockedBy = new Dictionary<BlockingRequestKey, SchedulableRequest>();
            _requestsWeAreBlocking = new HashSet<SchedulableRequest>();

            _timeRecords = new Dictionary<SchedulableRequestState, ScheduleTimeRecord>(5);
            _timeRecords[SchedulableRequestState.Unscheduled] = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Blocked] = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Yielding] = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Executing] = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Ready] = new ScheduleTimeRecord();
            _timeRecords[SchedulableRequestState.Completed] = new ScheduleTimeRecord();

            ChangeToState(SchedulableRequestState.Unscheduled);
        }
コード例 #3
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public SchedulingPlan(IConfigCache configCache, SchedulingData schedulingData)
 {
     _configCache                = configCache;
     _schedulingData             = schedulingData;
     this.MaximumConfigurationId = BuildRequestConfiguration.InvalidConfigurationId;
 }
コード例 #4
0
ファイル: Scheduler.cs プロジェクト: cameron314/msbuild
        /// <summary>
        /// Resets the scheduler.
        /// </summary>
        public void Reset()
        {
            DumpConfigurations();
            DumpRequests();
            _schedulingPlan = null;
            _schedulingData = new SchedulingData();
            _availableNodes = new Dictionary<int, NodeInfo>(8);
            _currentInProcNodeCount = 0;
            _currentOutOfProcNodeCount = 0;

            _nextGlobalRequestId = 0;
            _customRequestSchedulingAlgorithm = null;
        }
コード例 #5
0
ファイル: SchedulingPlan.cs プロジェクト: cameron314/msbuild
 /// <summary>
 /// Constructor.
 /// </summary>
 public SchedulingPlan(IConfigCache configCache, SchedulingData schedulingData)
 {
     _configCache = configCache;
     _schedulingData = schedulingData;
     this.MaximumConfigurationId = BuildRequestConfiguration.InvalidConfigurationId;
 }