w3c / IndexedDB

Indexed Database API
https://w3c.github.io/IndexedDB/
Other
243 stars 62 forks source link

Clarify queueing behavior when opening a database #354

Open taymonbeal opened 3 years ago

taymonbeal commented 3 years ago

"I think all IDB open requests (for an origin) are put into one queue, and are processed in order. So while there is a blocked open request for version X+1, any new requests for version X will be blocked as well and won't result in new connections (and will eventually fail with an error when the X+1 completes)"

I found it difficult to find this behavior in the spec and assumed that I would have to figure out some kind of dining-philosophers solution to prevent requests from starving each other. A little non-normative webdev-facing text might help. @inexorabletash

inexorabletash commented 3 years ago

The non-normative text in https://w3c.github.io/IndexedDB/#open-requests could be extended, or something added to https://w3c.github.io/IndexedDB/#dom-idbfactory-open