public MultiThreadedStrategy(int bufferSize) { if (bufferSize.BitCount() != 1) { throw new ArgumentException("bufferSize must be a power of 2"); } this.bufferSize = bufferSize; indexMask = bufferSize - 1; pendingPublications = new AtomicLongArray(bufferSize); for (int i = 0, size = pendingPublications.length(); i < size; i++) { pendingPublications.lazySet(i, Sequencer.INITIAL_CURSOR_VALUE); } }