how to reduce lock contention with the atomic package