Example #1
0
		/// <summary>
		/// Processes a phase worth of work, returning false when no work remains
		/// </summary>
		/// <returns>Returns true if more work remains</returns>
		public bool ProcessEntirePhase()
		{
			CurrentPhase.Drain(this);
			Debug.Assert(CurrentPhase.PendingWrites.Count == 0);

			if (PendingPhases.Count > 0)
			{
				CurrentPhase = PendingPhases.Pop();
			}

			return CurrentPhase.bWorkRemaining || (PendingPhases.Count > 0);
		}
Example #2
0
		public void CreateNewPhase()
		{
			PendingPhases.Push(CurrentPhase);
			CurrentPhase = new WritingPhase();
		}