Well, this guarantees that a commit is issued even if it's nested, which atomic() doesn't do. I'll port over the logic from that function and just do it with atomic.