public FizzBuzzEventHandler(FizzBuzzStep fizzBuzzStep, long iterations, ManualResetEvent mru)
 {
     _fizzBuzzStep    = fizzBuzzStep;
     _iterations      = iterations;
     _mru             = mru;
     _fizzBuzzCounter = new Volatile.PaddedLong(0);
 }
示例#2
0
        private void ResetCounters()
        {
            _remainCount.AtomicExchange(MAX_MSG_COUNT);

            for (int i = 0; i < POP_CNT; i++)
            {
                _counters[i] = new Volatile.PaddedLong(0);
                _eventHandlers[i].Reset();
                _workHandlers[i].Reset();
            }
        }
示例#3
0
 public void SetUp()
 {
     _volatile = new Volatile.PaddedLong(InitialValue);
 }
 public void SetUp()
 {
     _volatile = new Volatile.PaddedLong(InitialValue);
 }