public FizzBuzzEventHandler(FizzBuzzStep fizzBuzzStep, long iterations, ManualResetEvent mru) { _fizzBuzzStep = fizzBuzzStep; _iterations = iterations; _mru = mru; _fizzBuzzCounter = new PaddedLong(0); }
public OneToThreeReleasingWorkerPoolThroughputTest() { for (var i = 0; i < _numWorkers; i++) { _counters[i] = new PaddedLong(); } for (var i = 0; i < _numWorkers; i++) { _handlers[i] = new EventCountingAndReleasingWorkHandler(_counters, i); } }
public OneToThreeReleasingWorkerPoolThroughputTest() { for (var i = 0; i < _numWorkers; i++) { _counters[i] = new PaddedLong(); } for (var i = 0; i < _numWorkers; i++) { _handlers[i] = new EventCountingAndReleasingWorkHandler(_counters, i); } _workerPool = new WorkerPool <ValueEvent>(_ringBuffer, _ringBuffer.NewBarrier(), new FatalExceptionHandler(), _handlers); _ringBuffer.AddGatingSequences(_workerPool.GetWorkerSequences()); }