Re: [IndexedDB] Consider adding a completion event or callback to the IDBDatabase.close() operation (#72)

I wasn't aware that transactions could be open indefinitely? I will try to re-read the docs and specs more closely..

In that case, and based on the information you provided, it seems like the best solution is that when a `blocked` event is encountered, cancel the `open` transaction, wait a few milliseconds and then retry again.. repeat that several times if needed (say up a second or two in total) and eventually give up with an error if that doesn't help.

Having a completion event or callback for the close operation would help avoiding some of these situations, at least in cases where the library is used in a very controlled way - e.g. one tab, one instance, one connection, etc. I'm also considering having an internal event queue for the library to synchronize all requests to occur sequentially (whether or not that would significantly reduce performance is remain to be seen)..

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/IndexedDB/issues/72#issuecomment-199428533

Received on Monday, 21 March 2016 19:06:36 UTC