On the homepage, there is an example of an incrementing counter. Is this actually an atomic operation, or if two users hit the button at the same time, will it potentially only increase the count by 1?
lease.acquire('count')
local count = storage.count or 0
storage.count = count + 1
lease.release('count')
return {count=count}
We skipped the lease just for simplicity's sake, but if you need that kind of protection, that's why we implemented leases.