Ejemplo n.º 1
0
 private void GenerateGoals()
 {
     while (_counter < _maxValue)
     {
         var goal = new Goal(_counter);
         _transmitter.PutGoal(goal);
         _counter++;
     }
     for (int i = 0; i < _nConsumer; i++)
     {
         _transmitter.PutGoal(null);
     }
 }
Ejemplo n.º 2
0
 public void Start()
 {
     while (!Volatile.Read(ref _stop))
     {
         _transmitter.PutGoal(_goalGenerator.GenerateGoal());
     }
 }