private void ReleaseTasks(int currentCycle) { while (WaitingList.Count() > 0 && currentCycle >= WaitingList.Peek().Release) { ReadyList.Enqueue(WaitingList.Dequeue()); } }