class Sidekiq::Processor::Counter

bugs.ruby-lang.org/issues/14706<br>implement something simple ourselves.
Ruby doesn’t provide atomic counters out of the box so we’ll

def incr(amount = 1)

def incr(amount = 1)
  @lock.synchronize { @value += amount }
end

def initialize

def initialize
  @value = 0
  @lock = Mutex.new
end

def reset

def reset
  @lock.synchronize {
    val = @value
    @value = 0
    val
  }
end