示例#1
0
    public virtual void ReportDone(IWorkerId workerId, IWorkId workId, int returnCode)
    {
      // TODO: what to do with errors? -- the time being we let OnWorkDone record them
      if (this.OnWorkDone != null)
      {
        this.OnWorkDone(workId.SliceId, returnCode);
      }

      this.queue.ReportDone(workerId, workId);
    }
示例#2
0
 protected abstract int Do(IWorkId work);
示例#3
0
 private void OnWorkDone(IWorkId work, int returnCode)
 {
   this.scheduler.ReportDone(this.id, work, returnCode);
 }
示例#4
0
 private bool TryGetWorkToDo(out IWorkId workId)
 {
   return this.scheduler.TryPop(this.id, out workId);
 }
示例#5
0
 protected override IEnumerable<ISliceId> SlicesToScheduleForReanalysis(IWorkId workId)
 {
   return this.db.Dependences(workId.SliceId);
 }
示例#6
0
    public override void ReportDone(IWorkerId workerId, IWorkId workId, int returnCode)
    {
      base.ReportDone(workerId, workId, returnCode);

      this.FeedQueue(this.SlicesToScheduleForReanalysis(workId));
    }
示例#7
0
 protected virtual IEnumerable<ISliceId> SlicesToScheduleForReanalysis(IWorkId workId)
 {
   yield break;
 }
示例#8
0
 public bool TryPop(IWorkerId workerId, out IWorkId workId)
 {
   return this.queue.TryPop(workerId, out workId);
 }
示例#9
0
 protected override IEnumerable<ISliceId> SlicesToScheduleForReanalysis(IWorkId workId)
 {
   return base.SlicesToScheduleForReanalysis(workId).Union(this.db.SlicesForMethodsInTheSameType(workId.SliceId)).Distinct();
 }