take the advice of an XXX comment and use an atomic operation to decrement a