protected override void ConsumeItems( int count ) { SpinWait spinWait = new SpinWait(); int value; for ( int i = 0; i < count; ) { if ( this.queue.TryDequeue( out value ) ) { i++; spinWait.Reset(); } else { spinWait.SpinOnce(); } } }