Python Atomic Operations Vs Stateful Operations