Exemplo n.º 1
0
 public void StartProvessingGoals()
 {
     while (!(Volatile.Read(ref _stop) && _transmitter.Count() == 0))
     {
         var goal = _transmitter.GetGoal();
         if (goal == null)
         {
             continue;
         }
         _utilizer.Utilize(goal);
     }
 }
Exemplo n.º 2
0
        private void ProcessGoals()
        {
            Goal goal;

            while (true)
            {
                goal = _transmitter.GetGoal();
                if (goal == null)
                {
                    break;
                }
                Goals.Add(goal.Id);
            }
            IsFinished = true;
            _waitHandle.Set();
        }