/studio to the deployed instance URL.
What are Durable Objects: https://developers.cloudflare.com/durable-objects/what-are-durable-objects/
blockConcurrencyWhile is like a lock, nothing can get into your DO while that runs.blockConcurrencyWhile). Store something in your state/storage that you are doing a transaction and reject anything if that's true.blockConcurrencyWhile personally and try to avoid it.Under the hood, Alarms are implemented by making reads and writes to the storage layer. This means Alarmandgetoperations follow the same rules as any other storage operationset
await setAnotherAlarm() does not set a new alarm, it overrides the alarm you set in the first line.state.storage.deleteAll() happens per-instance. Each user I have has an access to his/her own instance, but for some users, I no longer have access to user ID (forgot to track them...). Aren't they still going to incur a storage charge?alarm() {
await setAlarm() // This would be committed (and therefore overwrite the initial alarm? what happens to retries?)
await someOtherStorageOperation() // this too given no failure up until the first fetch
await fetch(...external) // Output - gates mean we now wait for previous operations to succeed
await setAnotherAlarm() // This would not be committed because of subsequent failure (write coalescing)
await triggerSomeFailure()
}