I am wondering in high concurrency, some requests will end up having to spend quite some time in the loop. Or, theoretically, a thread can never exist the loop - just before limitEnforcer.compareAndSet(currentValue, newValue) for that request is going to be executed, the thread is suspended and another thread gets a chance to modify limitEnforcer.