Re: [w3c/IndexedDB] Should IDBDatabase::close() be in parallel? (Issue #474)

SteveBeckerMSFT left a comment (w3c/IndexedDB#474)

The existing spec looks like it matches [Chromium's implementation](https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/indexeddb/idb_database.cc?q=IDBDatabase::close&ss=chromium%2Fchromium%2Fsrc).  Since [IDBDatabase::transaction()](https://w3c.github.io/IndexedDB/#dom-idbdatabase-transaction) is also synchronous, we need to set the [connection's close pending flag](https://w3c.github.io/IndexedDB/#connection-close-pending-flag) synchronously since it is also checked by transaction().

Maybe we could improve step 3 when the forced flag is set to false? 

`3. Wait for all transactions [created](https://w3c.github.io/IndexedDB/#transaction-created) using connection to complete. Once they are complete, connection is [closed](https://w3c.github.io/IndexedDB/#connection-closed).` 

This is not a synchronous wait, but the close may happen in the same thread.  Maybe there's a better way to express this?

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

Message ID: <w3c/IndexedDB/issues/474/3321008300@github.com>

Received on Monday, 22 September 2025 19:24:33 UTC