AtomicInteger works with two concepts : CAS and volatile variable.
AtomicInteger
volatile
Using volatile variable insures that the current value will
for (;;) is an infinite loop, so it will just retry the attempt.
for (;;)