public FizzBuzzEventHandler(FizzBuzzStep fizzBuzzStep, long iterations, ManualResetEvent mru) { _fizzBuzzStep = fizzBuzzStep; _iterations = iterations; _mru = mru; _fizzBuzzCounter = new _Volatile.PaddedLong(0); }
public OneToThreeReleasingWorkerPoolThroughputTest() : base(Test_Disruptor, ITERATIONS) { ThreadPool.SetMaxThreads(NUM_WORKERS, NUM_WORKERS); for (int i = 0; i < NUM_WORKERS; i++) { counters[i] = new _Volatile.PaddedLong(); handlers[i] = new EventCountingAndReleasingWorkHandler(counters, i); } workerPool = new WorkerPool<ValueEvent>(ringBuffer , ringBuffer.NewBarrier() ,new FatalExceptionHandler() ,handlers); ringBuffer.AddGatingSequences(workerPool.getWorkerSequences()); }
public OneToThreeWorkerPoolThroughputTest() : base(Test_Disruptor, ITERATIONS) { for (int i = 0; i < NUM_WORKERS; i++) { counters[i] = new _Volatile.PaddedLong(); queueWorkers[i] = new EventCountingQueueProcessor(blockingQueue, counters, i); handlers[i] = new EventCountingWorkHandler(counters, i); } workerPool = new WorkerPool <ValueEvent>(ringBuffer, ringBuffer.NewBarrier(), new FatalExceptionHandler(), handlers); ringBuffer.AddGatingSequences(workerPool.getWorkerSequences()); }
public OneToThreeWorkerPoolThroughputTest() : base(Test_Disruptor, ITERATIONS) { for (int i = 0; i < NUM_WORKERS; i++) { counters[i] = new _Volatile.PaddedLong(); queueWorkers[i] = new EventCountingQueueProcessor(blockingQueue, counters, i); handlers[i] = new EventCountingWorkHandler(counters, i); } workerPool = new WorkerPool<ValueEvent>(ringBuffer, ringBuffer.NewBarrier(), new FatalExceptionHandler(), handlers); ringBuffer.AddGatingSequences(workerPool.getWorkerSequences()); }
public OneToThreeReleasingWorkerPoolThroughputTest() : base(Test_Disruptor, ITERATIONS) { ThreadPool.SetMaxThreads(NUM_WORKERS, NUM_WORKERS); for (int i = 0; i < NUM_WORKERS; i++) { counters[i] = new _Volatile.PaddedLong(); handlers[i] = new EventCountingAndReleasingWorkHandler(counters, i); } workerPool = new WorkerPool <ValueEvent>(ringBuffer , ringBuffer.NewBarrier() , new FatalExceptionHandler() , handlers); ringBuffer.AddGatingSequences(workerPool.getWorkerSequences()); }
public FizzBuzzEventHandler_V3(FizzBuzzStep fizzBuzzStep) { _fizzBuzzStep = fizzBuzzStep; fizzBuzzCounter = new _Volatile.PaddedLong(0); }
public void SetUp() { _volatile = new _Volatile.PaddedLong(InitialValue); }
public void SetUp() { _volatile = new _Volatile.PaddedLong(InitialValue); }