How do I modify an int atomically and thread-safely in Java?
Atomically increment, test & set, etc...?
Use AtomicInteger.