public virtual void EndGroup()
 {
     if (CurrentSorter != null)
     {
         CurrentSorter.SortAndAppendTo(lastPoint, TargetScheduler);
         lastPoint     = CurrentSorter.OutPoint;
         CurrentSorter = null;
     }
 }
        public virtual void BeginGroup()
        {
            if (CurrentSorter != null)
            {
                throw new Exception("GroupScheduler.BeginGroup: already in a group!");
            }

            CurrentSorter = new SortingScheduler2d();
        }